Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class TonWhalesWithdrawalBuilder extends TransactionBuilder {
setWithdrawalMessage(unstakeAmount: string, queryId?: string): TonWhalesWithdrawalBuilder {
const qId = queryId || '0000000000000000';

this.transaction.withdrawAmount = unstakeAmount;
this.transaction.message = TON_WHALES_WITHDRAW_OPCODE + qId + unstakeAmount;
return this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ describe('Ton Whales Withdrawal Builder', () => {

// Build Signed Transaction
const signedBuiltTx = await builder.build();
const jsonTx = signedBuiltTx.toJson();

// Verify that the builder correctly set the withdrawal amount on the transaction object
should.equal(jsonTx.withdrawAmount, fixture.withdrawAmount);

// Byte-for-byte equality with the Sandbox output
should.equal(signedBuiltTx.toBroadcastFormat(), fixture.tx);
Expand Down