From 7ddce36e24e01441323cebeb8cb8b62baba29285 Mon Sep 17 00:00:00 2001 From: Jeremy Cooper Date: Mon, 3 Feb 2025 23:12:47 -0800 Subject: [PATCH] Wait until transactions are confirmed, not merely sent. Use `send_and_confirm_transaction` instead of `send_transaction_with_config` as the former only returns once the transaction has been confirmed (via the "finalized" strategy) or has timed out. The latter method only sends the transaction in the _hopes_ that it will be confirmed, which, during periods of high congestion, isn't a secure strategy. --- helium-wallet/src/cmd/mod.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helium-wallet/src/cmd/mod.rs b/helium-wallet/src/cmd/mod.rs index 9849a2b7..e2fb5166 100644 --- a/helium-wallet/src/cmd/mod.rs +++ b/helium-wallet/src/cmd/mod.rs @@ -8,8 +8,7 @@ use helium_lib::{ keypair::Keypair, message, priority_fee, solana_client::{ - self, rpc_config::RpcSendTransactionConfig, rpc_request::RpcResponseErrorData, - rpc_response::RpcSimulateTransactionResult, + self, rpc_request::RpcResponseErrorData, rpc_response::RpcSimulateTransactionResult, }, solana_sdk::transaction::VersionedTransaction, TransactionOpts,