From 1f19dcd7b59e97b3c00cf40980b7aa041f73e8f0 Mon Sep 17 00:00:00 2001 From: Asia Date: Mon, 25 Sep 2023 15:05:58 +0200 Subject: [PATCH] fix: ETH caller is set incorrectly when in strict mode --- src/contract/HandlerBasedContract.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/contract/HandlerBasedContract.ts b/src/contract/HandlerBasedContract.ts index cffcdd92..ab7dcfc1 100644 --- a/src/contract/HandlerBasedContract.ts +++ b/src/contract/HandlerBasedContract.ts @@ -456,7 +456,10 @@ export class HandlerBasedContract implements Contract { vrf: boolean ) { const { arweave } = this.warp; - const caller = this._signature.type == 'arweave' ? await arweave.wallets.ownerToAddress(owner) : owner; + const caller = + this._signature.type == 'arweave' + ? await arweave.wallets.ownerToAddress(owner) + : await this._signature.getAddress(); const handlerResult = await this.callContract(input, 'write', caller, undefined, tags, transfer, strict, vrf); if (handlerResult.type !== 'ok') { throw Error('Cannot create interaction: ' + JSON.stringify(handlerResult.error || handlerResult.errorMessage));