We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Also, unit test for KMS is not correct: ({ description, isDelegated, expected }) => { test( description, async () => { const signTransactionSigner = isDelegated ? signerWithDelegator : signer; const sampleClause = Clause.callFunction( Address.of(TESTING_CONTRACT_ADDRESS), ABIContract.ofAbi(TESTING_CONTRACT_ABI).getFunction( 'deposit' ), [123] ) as TransactionClause; const originAddress = await signTransactionSigner.getAddress(); const gasResult = await thorClient.gas.estimateGas( [sampleClause], originAddress ); const txBody = await thorClient.transactions.buildTransactionBody( [sampleClause], gasResult.totalGas, { isDelegated } ); const signedRawTx = await signTransactionSigner.signTransaction( signerUtils.transactionBodyToTransactionRequestInput( txBody, originAddress ) ); const signedTx = Transaction.decode( HexUInt.of(signedRawTx.slice(2)).bytes, true ); expect(signedTx).toBeDefined(); expect(signedTx.body).toMatchObject(expected.body); expect(signedTx.origin.toString()).toBe( Address.checksum(HexUInt.of(originAddress)) ); expect(signedTx.isDelegated).toBe(isDelegated); expect(signedTx.isSigned).toBe(true); expect(signedTx.signature).toBeDefined(); }, timeout ); As we see, unit test signs transaction both for gasPayer and as origin. That goes agains VIP-191. https://github.com/vechain/VIPs/blob/master/vips/VIP-191.md
Also, unit test for KMS is not correct:
({ description, isDelegated, expected }) => { test( description, async () => { const signTransactionSigner = isDelegated ? signerWithDelegator : signer; const sampleClause = Clause.callFunction( Address.of(TESTING_CONTRACT_ADDRESS), ABIContract.ofAbi(TESTING_CONTRACT_ABI).getFunction( 'deposit' ), [123] ) as TransactionClause; const originAddress = await signTransactionSigner.getAddress(); const gasResult = await thorClient.gas.estimateGas( [sampleClause], originAddress ); const txBody = await thorClient.transactions.buildTransactionBody( [sampleClause], gasResult.totalGas, { isDelegated } ); const signedRawTx = await signTransactionSigner.signTransaction( signerUtils.transactionBodyToTransactionRequestInput( txBody, originAddress ) ); const signedTx = Transaction.decode( HexUInt.of(signedRawTx.slice(2)).bytes, true ); expect(signedTx).toBeDefined(); expect(signedTx.body).toMatchObject(expected.body); expect(signedTx.origin.toString()).toBe( Address.checksum(HexUInt.of(originAddress)) ); expect(signedTx.isDelegated).toBe(isDelegated); expect(signedTx.isSigned).toBe(true); expect(signedTx.signature).toBeDefined(); }, timeout );
As we see, unit test signs transaction both for gasPayer and as origin. That goes agains VIP-191.
https://github.com/vechain/VIPs/blob/master/vips/VIP-191.md
Originally posted by @iggyzap in #1775
The text was updated successfully, but these errors were encountered:
@GrandinLuc
Is this still open?
Sorry, something went wrong.
GrandinLuc
No branches or pull requests
Originally posted by @iggyzap in #1775
The text was updated successfully, but these errors were encountered: