From b091366e59f847922aac8f476c26b7dfd8b85d9d Mon Sep 17 00:00:00 2001 From: h0ngcha0 Date: Fri, 19 Apr 2024 13:01:26 +0200 Subject: [PATCH] Remove approve field from SignExecuteContractMethodParams { - const tokenId = byteStringCodec.encodeBuffer(Buffer.from(token.id, 'hex')) - const tokenAmount = encodeU256Const(BigInt(token.amount)) - approveTokensInstrs.push('14' + tokenId.toString('hex')) - approveTokensInstrs.push(tokenAmount) + approveTokensInstrs.push('14' + byteStringCodec.encodeBuffer(Buffer.from(token.id, 'hex')).toString('hex')) + approveTokensInstrs.push(encodeU256Const(BigInt(token.amount))) approveTokensInstrs.push(encodeInstr(ApproveToken)) }) } diff --git a/test/contract.test.ts b/test/contract.test.ts index b2c5f6696..45ed44869 100644 --- a/test/contract.test.ts +++ b/test/contract.test.ts @@ -609,11 +609,7 @@ describe('contract', function () { }, signer, attoAlphAmount: ONE_ALPH * 2n, - tokens: [{ id: sub.contractInstance.contractId, amount: 200n }], - approve: { - attoAlphAmount: ONE_ALPH, - tokens: [{ id: sub.contractInstance.contractId, amount: 200n }] - } + tokens: [{ id: sub.contractInstance.contractId, amount: 200n }] }) const afterBalances = await signer.nodeProvider.addresses.getAddressesAddressBalance(signerAddress)