Skip to content

Commit

Permalink
feat(sdk-coin-sol): ignore zero value prio fee
Browse files Browse the repository at this point in the history
Ticket: CR-1224
  • Loading branch information
Vijay-Jagannathan committed Jan 21, 2025
1 parent 98994d1 commit ade004a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/sdk-coin-sol/src/lib/tokenTransferBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class TokenTransferBuilder extends TransactionBuilder {
},
};

if (!this._priorityFee) {
if (!this._priorityFee || this._priorityFee === BigInt(0)) {
this._instructionsData = [...createAtaInstructions, ...sendInstructions];
} else {
// order is important, createAtaInstructions must be before sendInstructions
Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-sol/src/lib/transferBuilderV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export class TransferBuilderV2 extends TransactionBuilder {

let addPriorityFeeInstruction: SetPriorityFee;
// If there are createAtaInstructions, then token is involved and we need to add a priority fee instruction
if (!this._priorityFee) {
if (!this._priorityFee || this._priorityFee === BigInt(0)) {
this._instructionsData = [...createAtaInstructions, ...sendInstructions];
} else if (
createAtaInstructions.length !== 0 ||
Expand Down

0 comments on commit ade004a

Please sign in to comment.