Reputation: 313
I get this error when I try to execute this using phantom wallet and react app
const transferTransaction = new Transaction()
.add(SystemProgram.transfer({
fromPubkey: alice.publicKey,
toPubkey: feePayer.publicKey,
lamports: lamportsToSend
}))
const network = "https://api.devnet.solana.com";
const connection = new Connection(network);
const transaction = new Transaction();
transferTransaction.recentBlockhash = (await connection.getRecentBlockhash()).blockhash;
const { signature } = await window.solana.signAndSendTransaction(transferTransaction);
await connection.confirmTransaction(signature);
Upvotes: 4
Views: 1841