Skip to content

Commit

Permalink
token-cli: Use the commitment field from Solana config (#7591)
Browse files Browse the repository at this point in the history
  • Loading branch information
acheroncrypto authored Dec 16, 2024
1 parent 9d467db commit b8132db
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion token/cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,12 @@ impl<'a> Config<'a> {
.unwrap_or(&cli_config.json_rpc_url),
);
let websocket_url = solana_cli_config::Config::compute_websocket_url(&json_rpc_url);
let commitment_config = CommitmentConfig::from_str(&cli_config.commitment)
.unwrap_or_else(|_| CommitmentConfig::confirmed());
let rpc_client = Arc::new(RpcClient::new_with_timeouts_and_commitment(
json_rpc_url,
DEFAULT_RPC_TIMEOUT,
CommitmentConfig::confirmed(),
commitment_config,
DEFAULT_CONFIRM_TX_TIMEOUT,
));
let sign_only = matches.try_contains_id(SIGN_ONLY_ARG.name).unwrap_or(false);
Expand Down

0 comments on commit b8132db

Please sign in to comment.