Skip to content

Commit

Permalink
Updated fromPubkey to use PublicKey in the transfer instruction (#542)
Browse files Browse the repository at this point in the history
* Updated fromPubkey to use PublicKey in the transfer instruction

* Update solana-pay.md

* Fix duplicate fromPubkey in transfer instruction and correct indentation

* fix indentation

* fix indentation

---------

Co-authored-by: Mike MacCana <[email protected]>
  • Loading branch information
husna3249 and mikemaccana authored Oct 1, 2024
1 parent 76f7ff4 commit 89aef2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/courses/solana-pay/solana-pay.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,10 @@ async function post(req: PublicKey, res: PublicKey) {
});

const instruction = SystemProgram.transfer({
fromPubkey: account,
fromPubkey: new PublicKey(account),
toPubkey: Keypair.generate().publicKey,
lamports: 0.001 * LAMPORTS_PER_SOL,
});
});

transaction.add(instruction);

Expand Down

0 comments on commit 89aef2f

Please sign in to comment.