Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

token-cli: Use the commitment field from Solana config #7591

Conversation

acheroncrypto
Copy link
Contributor

Problem

spl-token CLI doesn't respect the commitment field of Solana config when creating the RPC client.

See #7590 for more details.

Summary of changes

Use the confirmation field from the Solana config when creating the RPC client.

Note: This won't affect any users (unless they've overridden the commitment field) because confirmed is already the default commitment of Solana config.

Resolves #7590

@mergify mergify bot added the community Community contribution label Dec 16, 2024
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing and fixing this! Since the token-cli doesn't accept a commitment parameter otherwise, it makes sense to just read whatever is in the config file.

And if there's an invalid commitment in the config file, then the base Solana CLI falls back to confirmed, so this change is totally consistent with the base CLI.

@joncinque joncinque merged commit b8132db into solana-labs:master Dec 16, 2024
31 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spl-token CLI ignores the Solana config's confirmation field
2 participants