From 59c4e5310a88566cdb08644ac48be06ab8a76179 Mon Sep 17 00:00:00 2001 From: Morgan Mccauley Date: Mon, 17 Jul 2023 09:34:22 +1200 Subject: [PATCH] feat: Expose `fetch` to VM runner --- indexer-js-queue-handler/indexer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/indexer-js-queue-handler/indexer.js b/indexer-js-queue-handler/indexer.js index 648533e09..51c64ec7f 100644 --- a/indexer-js-queue-handler/indexer.js +++ b/indexer-js-queue-handler/indexer.js @@ -80,6 +80,7 @@ export default class Indexer { vm.freeze(blockWithHelpers, 'block'); vm.freeze(context, 'context'); vm.freeze(context, 'console'); // provide console.log via context.log + vm.freeze(fetch, 'fetch'); vm.freeze(mutationsReturnValue, 'mutationsReturnValue'); // this still allows context.set to modify it const modifiedFunction = this.transformIndexerFunction(indexerFunction.code);