Skip to content

Commit

Permalink
Merge pull request #3710 from BitGo/WP-209-fix-solana-verifyTransacti…
Browse files Browse the repository at this point in the history
…on-method

fix(sdk-coin-sol): fix solana verifyTransaction method
  • Loading branch information
alebusse authored Jul 10, 2023
2 parents af40c49 + 87d3144 commit e15f9b8
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/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export class Sol extends BaseCoin {
throw new Error('Tx fee payer is not the wallet root address');
}

if (!_.isEqual(explainedTx.durableNonce, durableNonce)) {
if (durableNonce && !_.isEqual(explainedTx.durableNonce, durableNonce)) {
throw new Error('Tx durableNonce does not match with param durableNonce');
}

Expand Down
2 changes: 1 addition & 1 deletion modules/sdk-coin-sol/test/unit/sol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe('SOL:', function () {
const txParams = newTxParams();
const txPrebuild = newTxPrebuild();
await basecoin
.verifyTransaction({ txParams, txPrebuild, memo, errorDurableNonce, wallet: walletObj } as any)
.verifyTransaction({ txParams, txPrebuild, memo, durableNonce: errorDurableNonce, wallet: walletObj } as any)
.should.be.rejectedWith('Tx durableNonce does not match with param durableNonce');
});

Expand Down

0 comments on commit e15f9b8

Please sign in to comment.