Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3a7d6dd

Browse files
committedDec 16, 2024·
token-cli: Use the commitment field from Solana config
1 parent 5380b0e commit 3a7d6dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎token/cli/src/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,12 @@ impl<'a> Config<'a> {
100100
.unwrap_or(&cli_config.json_rpc_url),
101101
);
102102
let websocket_url = solana_cli_config::Config::compute_websocket_url(&json_rpc_url);
103+
let commitment_config = CommitmentConfig::from_str(&cli_config.commitment)
104+
.unwrap_or_else(|_| CommitmentConfig::confirmed());
103105
let rpc_client = Arc::new(RpcClient::new_with_timeouts_and_commitment(
104106
json_rpc_url,
105107
DEFAULT_RPC_TIMEOUT,
106-
CommitmentConfig::confirmed(),
108+
commitment_config,
107109
DEFAULT_CONFIRM_TX_TIMEOUT,
108110
));
109111
let sign_only = matches.try_contains_id(SIGN_ONLY_ARG.name).unwrap_or(false);

0 commit comments

Comments
 (0)
This repository has been archived.