Skip to content

Commit ebb4ce4

Browse files
committed
chore(sdk-coin-apt): add getter for seq no. in tx builder
TICKET: COIN-3450
1 parent 96c2adf commit ebb4ce4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

modules/sdk-coin-apt/src/lib/transactionBuilder/transactionBuilder.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ export abstract class TransactionBuilder extends BaseTransactionBuilder {
2828
*/
2929
protected abstract get transactionType(): TransactionType;
3030

31+
getSequenceNumber(): number {
32+
return this.transaction.sequenceNumber;
33+
}
34+
3135
/**
3236
* Initialize the transaction builder fields using the decoded transaction data
3337
*

modules/sdk-coin-apt/test/unit/transactionBuilder/transferBuilder.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ describe('Apt Transfer Transaction', () => {
5252

5353
it('should build and send a signed tx', async function () {
5454
const txBuilder = factory.from(testData.TRANSACTION_USING_TRANSFER_COINS);
55+
txBuilder.getSequenceNumber().should.equal(146);
56+
5557
const tx = (await txBuilder.build()) as TransferTransaction;
5658
should.equal(tx.type, TransactionType.Send);
5759
tx.inputs.length.should.equal(1);

0 commit comments

Comments
 (0)