Skip to main content
typo
Source Link
AMilz
  • 1.9k
  • 3
  • 11

You're not grabbing a valid blockhash:

tx.recentBlockhash = Keypair.generate().publicKey.toString();

Try replacing it with a recent blockhashhblockhash:

let latestBlockhash = await connection.getLatestBlockhash('finalized');
tx.recentBlockhash = latestBlockhash.blockhash;

You're not grabbing a valid blockhash:

tx.recentBlockhash = Keypair.generate().publicKey.toString();

Try replacing it with a recent blockhashh:

let latestBlockhash = await connection.getLatestBlockhash('finalized');
tx.recentBlockhash = latestBlockhash.blockhash;

You're not grabbing a valid blockhash:

tx.recentBlockhash = Keypair.generate().publicKey.toString();

Try replacing it with a recent blockhash:

let latestBlockhash = await connection.getLatestBlockhash('finalized');
tx.recentBlockhash = latestBlockhash.blockhash;
Source Link
AMilz
  • 1.9k
  • 3
  • 11

You're not grabbing a valid blockhash:

tx.recentBlockhash = Keypair.generate().publicKey.toString();

Try replacing it with a recent blockhashh:

let latestBlockhash = await connection.getLatestBlockhash('finalized');
tx.recentBlockhash = latestBlockhash.blockhash;