Skip to content

Commit

Permalink
docs: fix merchant integration code snippet
Browse files Browse the repository at this point in the history
fix error in validate transaction signature snippet.

example code was fixed in this PR: #81
  • Loading branch information
cogoo authored Mar 4, 2022
1 parent a70dd69 commit 7774c17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions docs/src/core/MERCHANT_INTEGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,9 @@ Once the `findTransactionSignature` function returns a signature, it confirms th
* found matches the transaction that you expected.
*/
console.log('\n6. 🔗 Validate transaction \n');
const amountInLamports = amount.times(LAMPORTS_PER_SOL).integerValue(BigNumber.ROUND_FLOOR);

try {
await validateTransactionSignature(connection, signature, recipient, amountInLamports, undefined, reference);
await validateTransactionSignature(connection, signature, recipient, amount, undefined, reference);

// Update payment status
paymentStatus = 'validated';
Expand Down

0 comments on commit 7774c17

Please sign in to comment.