diff --git a/src/store/stake-pool.ts b/src/store/stake-pool.ts index 403c8af..a04435c 100644 --- a/src/store/stake-pool.ts +++ b/src/store/stake-pool.ts @@ -129,7 +129,7 @@ export const useStakePoolStore = defineStore('stake-pool', (): StakePoolStore => ); // watch(reserveStakeBalance, async (con) => { - // const { blockhash } = await con.getRecentBlockhash('max'); + // const { blockhash } = await con.getLatestBlockhash('max'); // fees.txFee = (await con.getFeeCalculatorForBlockhash(blockhash)).value?.lamportsPerSignature ?? 0; // // minRentBalance.value = (await con.getMinimumBalanceForRentExemption(STAKE_STATE_LEN)) + 1; // }, { immediate: true }); diff --git a/src/utils/connection.ts b/src/utils/connection.ts index debfe6f..9981b56 100644 --- a/src/utils/connection.ts +++ b/src/utils/connection.ts @@ -60,7 +60,7 @@ export async function sendTransaction( let transaction = new Transaction({ feePayer: wallet.publicKey }); transaction.add(...instructions); - transaction.recentBlockhash = (await connection.getRecentBlockhash('finalized')).blockhash; + transaction.recentBlockhash = (await connection.getLatestBlockhash('finalized')).blockhash; if (signers.length > 0) { transaction.partialSign(...signers); @@ -119,7 +119,7 @@ export const sendTransactions = async ( const transactions: Transaction[] = []; if (!blockhash) { - blockhash = (await connection.getRecentBlockhash(commitment)).blockhash; + blockhash = (await connection.getLatestBlockhash(commitment)).blockhash; } for (let i = 0; i < instructionSet.length; i++) {