From 81d305fdb4d6fa7d179a48fd7ddb0ddbda76ff78 Mon Sep 17 00:00:00 2001 From: atticusofsparta Date: Wed, 29 Nov 2023 19:47:06 -0600 Subject: [PATCH] fix(execution context): when loading interactions for arweave gateway type, use arweave gateway for blockheight. --- src/contract/HandlerBasedContract.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index ca219d7b..95c79e29 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -707,7 +707,9 @@ export class HandlerBasedContract implements Contract { let executionContext = await this.createExecutionContext(this._contractTxId, sortKey, true); const currentBlockData = - this.warp.environment == 'mainnet' ? await this._arweaveWrapper.warpGwBlock() : await arweave.blocks.getCurrent(); + this.warp.environment == 'mainnet' && !(this.warp.interactionsLoader.type() === 'arweave') + ? await this._arweaveWrapper.warpGwBlock() + : await arweave.blocks.getCurrent(); // add caller info to execution context let effectiveCaller;