Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit b8132db

Browse files
token-cli: Use the commitment field from Solana config (#7591)
1 parent 9d467db commit b8132db

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

token/cli/src/config.rs

+3-1
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)