-
Notifications
You must be signed in to change notification settings - Fork 11.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[cli] improve display for sui client new-address command #13675
[cli] improve display for sui client new-address command #13675
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
crates/sui/src/client_commands.rs
Outdated
@@ -1046,12 +1047,17 @@ impl SuiClientCommands { | |||
derivation_path, | |||
word_length, | |||
} => { | |||
let (address, phrase, scheme) = context.config.keystore.generate_and_add_new_key( | |||
let (address, phrase, _scheme) = context.config.keystore.generate_and_add_new_key( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is scheme
unused because it's already captured in key_scheme
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, key_scheme
(user provided) and scheme
(returned by keystore) are the same.
nit: In the screenshot, it looks lie the phrase "Created new keypair and saved it to keystore." is clipping through the table output. Is that being output to |
Good observation. It's unfortunately a limitation of the crate we're using. I will try to see if I can manually draw the vertical lines only for rows 1-3. |
f50cc95
to
6237328
Compare
Fixed! |
6237328
to
1b848a0
Compare
1b848a0
to
e2a37f0
Compare
Description
When requesting a new keypair via
sui client new-address
, display the newly created keypair in a well formatted table.Test Plan
How did you test the new or updated feature?
If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process.
Type of Change (Check all that apply)
Release notes
Updates the default output for the
sui client new-address <KEY_PAIR_SCHEME>
command in the Sui Client CLI. The console now displays a well-formatted table with the key pair details. If you include the--json
flag (sui client new-address <KEY_PAIR_SCHEME> --json
), the console displays the JSON representation of the key pair details instead.