Skip to content

Commit e0011cd

Browse files
bhavidhingraat31416
authored andcommitted
refactor(sdk-coin-apt): check feePayerAddress for signablePayload
TICKET: COIN-2838
1 parent 120878a commit e0011cd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

modules/sdk-coin-apt/test/unit/utils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as testData from '../resources/apt';
22
import should from 'should';
33
import utils from '../../src/lib/utils';
4-
import { SignedTransaction } from '@aptos-labs/ts-sdk';
4+
import { SignedTransaction, TransactionAuthenticatorFeePayer } from '@aptos-labs/ts-sdk';
55

66
describe('Aptos util library', function () {
77
describe('isValidAddress', function () {
@@ -36,6 +36,11 @@ describe('Aptos util library', function () {
3636
describe('isValidDeserialize', function () {
3737
it('should succeed to correctly deserialize serialized transaction', function () {
3838
const signedTxn: SignedTransaction = utils.deserializeSignedTransaction(testData.TRANSFER);
39+
const authenticator = signedTxn.authenticator as TransactionAuthenticatorFeePayer;
40+
should.equal(
41+
authenticator.fee_payer.address.toString(),
42+
'0xdbc87a1c816d9bcd06b683c37e80c7162e4d48da7812198b830e4d5d8e0629f2'
43+
);
3944
const rawTx = signedTxn.raw_txn;
4045
const recipient = utils.getRecipientFromTransactionPayload(rawTx.payload);
4146
should.equal(rawTx.sender.toString(), testData.sender2.address);

0 commit comments

Comments
 (0)