Skip to content

Commit

Permalink
fix: ETH caller is set incorrectly when in strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
asiaziola committed Sep 25, 2023
1 parent b123ee0 commit 1f19dcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/contract/HandlerBasedContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,10 @@ export class HandlerBasedContract<State> implements Contract<State> {
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));
Expand Down

0 comments on commit 1f19dcd

Please sign in to comment.