From 00859ba27fc2442077b92172a34b4006b4abc80f Mon Sep 17 00:00:00 2001 From: guibescos <59208140+guibescos@users.noreply.github.com> Date: Thu, 5 Dec 2024 13:52:52 +0000 Subject: [PATCH] fix: use higher commitment for blockhash to remove 'Minimum context slot has not been reached' errors (#2170) * use higher commitment for blockhash * use higher commitment for blockhash --- target_chains/solana/sdk/js/solana_utils/package.json | 2 +- target_chains/solana/sdk/js/solana_utils/src/transaction.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target_chains/solana/sdk/js/solana_utils/package.json b/target_chains/solana/sdk/js/solana_utils/package.json index 40914d30a..202ad72b5 100644 --- a/target_chains/solana/sdk/js/solana_utils/package.json +++ b/target_chains/solana/sdk/js/solana_utils/package.json @@ -1,6 +1,6 @@ { "name": "@pythnetwork/solana-utils", - "version": "0.4.2", + "version": "0.4.3", "description": "Utility functions for Solana", "homepage": "https://pyth.network", "main": "lib/index.js", diff --git a/target_chains/solana/sdk/js/solana_utils/src/transaction.ts b/target_chains/solana/sdk/js/solana_utils/src/transaction.ts index cf14efe25..055a28b87 100644 --- a/target_chains/solana/sdk/js/solana_utils/src/transaction.ts +++ b/target_chains/solana/sdk/js/solana_utils/src/transaction.ts @@ -227,7 +227,7 @@ export class TransactionBuilder { args: PriorityFeeConfig ): Promise<{ tx: VersionedTransaction; signers: Signer[] }[]> { const blockhash = ( - await this.connection.getLatestBlockhash({ commitment: "confirmed" }) + await this.connection.getLatestBlockhash({ commitment: "finalized" }) ).blockhash; const jitoBundleSize =