-
Notifications
You must be signed in to change notification settings - Fork 57
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
feat: add --force option to forc-wallet new #148
Conversation
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.
Couple of suggestions for the code. Also I am a little worried as this is a pretty destructive and dangerous operation maybe we shouldn't offer it at all, and force people to remove their wallets explicitly, but happy to see this implemented as well. cc @sdankel
@sdankel @kayagokalp GM sir, looking forward for review of the changed code😀 |
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.
This is shaping up nicely, but where are the test cases? 😄
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Sorry for this, I missed your comment about the test example, I will do it later. |
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.
Left a few more suggestions. Thanks!
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
Co-authored-by: Sophie Dankel <[email protected]>
@kayagokalp Hi sir, could you please help me to review the latest code, or can we merge this pr now? |
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, left a single nit but not a blocker.
)); | ||
let mut need_replace = String::new(); | ||
reader.read_line(&mut need_replace).unwrap(); | ||
if need_replace.trim() == "y" { |
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.
if need_replace.trim() == "y" { | |
if need_replace.trim().to_lowercase() == "y" { |
Nothing to block but we may want to cast to lowercase first, so that both Y
and y
is accepted.
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.
I think it's pretty standard that the user has to match the case to choose the non-default option. Any other keypress is equivalent to selecting the default.
…#155) close #150 Refer to [Comment](#148 (comment)) I have reviewed whole forc-wallet project codes, all warning output that using `println!` has changed to `println_warning` ---- ## Screenshots ### For `Password do not match` #### Before ![image](https://github.com/FuelLabs/forc-wallet/assets/150114626/4dc8c5d9-94b3-48e5-a797-b9115eb78157) #### After ![image](https://github.com/FuelLabs/forc-wallet/assets/150114626/bdfeaf04-9768-44eb-b821-1fd6a3f156b1) ### For `Cached address for account` #### Before ![image](https://github.com/FuelLabs/forc-wallet/assets/150114626/3c0a4b65-ce2a-406e-b674-12b70e1082fe) #### After ![image](https://github.com/FuelLabs/forc-wallet/assets/150114626/f1850c17-1456-4aa0-8db8-2f3be42c23ba)
close #146