Refactor wallet selection and listing; update to handle encrypted wal… #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several improvements to the wallet management functionality in the
keytool_cli
module. The changes enhance user experience by providing better feedback and ensuring the wallet directory exists before listing wallets.Enhancements to wallet selection and display:
crates/command/src/keytool_cli/mod.rs
: Updated the wallet display logic to indicate the current selected wallet and improved input handling to allow canceling the selection process. Wallet files now end with.enc
instead of.toml
.crates/command/src/keytool_cli/mod.rs
: Modified the wallet display to trim the.enc
extension and visually distinguish the selected wallet using green and bold text.Improvements to wallet directory management:
crates/core/wallet/key/src/lib.rs
: Added logic to create the wallet directory if it does not exist, ensuring the directory structure is always present.crates/core/wallet/key/src/lib.rs
: Updated the wallet listing function to only include.enc
files, check if the wallet is selected, and sort the wallets alphabetically.