From bff1978b1cca907c7c268c9fbd531443775368ab Mon Sep 17 00:00:00 2001 From: rainnier Date: Mon, 2 May 2022 15:54:05 +0800 Subject: [PATCH] replace deprecated method use getLatestBlockhash instead of getRecentBlockhash --- index.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.mjs b/index.mjs index 815c5e8..e3b88dc 100644 --- a/index.mjs +++ b/index.mjs @@ -73,7 +73,7 @@ const createWSolAccount = async () => { transaction.add(...instructions); transaction.recentBlockhash = await ( - await connection.getRecentBlockhash() + await connection.getLatestBlockhash() ).blockhash; transaction.partialSign(wallet.payer); const result = await connection.sendTransaction(transaction, [