From 89aef2fc1b09313d8e942b37a3fa8922ba14d77b Mon Sep 17 00:00:00 2001 From: husna khan <131730258+husna3249@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:24:47 +0530 Subject: [PATCH] Updated fromPubkey to use PublicKey in the transfer instruction (#542) * 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 --- content/courses/solana-pay/solana-pay.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/courses/solana-pay/solana-pay.md b/content/courses/solana-pay/solana-pay.md index b8b8a0cf9..48d7991ab 100644 --- a/content/courses/solana-pay/solana-pay.md +++ b/content/courses/solana-pay/solana-pay.md @@ -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);