Skip to content

Commit

Permalink
always use finalized block hash to build tx
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 committed Mar 13, 2024
1 parent 9aa028e commit 85d043f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,10 @@ impl AppState {
tx: VersionedMessage,
reason: &'static str,
) -> GatewayResult<TxResponse> {
let recent_block_hash = self
let (recent_block_hash, _) = self
.client
.inner()
.get_latest_blockhash()
.get_latest_blockhash_with_commitment(CommitmentConfig::finalized())
.await
.map_err(SdkError::from)?;
let tx = self.wallet.sign_tx(tx, recent_block_hash)?;
Expand Down

0 comments on commit 85d043f

Please sign in to comment.