-
Notifications
You must be signed in to change notification settings - Fork 474
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
goal: added "wallet rename" #6161
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6161 +/- ##
==========================================
- Coverage 56.29% 56.25% -0.04%
==========================================
Files 494 494
Lines 69958 69989 +31
==========================================
- Hits 39381 39373 -8
- Misses 27907 27940 +33
- Partials 2670 2676 +6 ☔ View full report in Codecov by Sentry. |
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.
Was it tested? consider adding a new e2e expect test
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'm inclined to accept even without expect script test. I find those expect scripts painful to read/write, and to me this is essentially "UI", we need not be as concerned about perfect correctness here as we try to be on the protocol. This change amounts to little more than a prepackaged curl
command.
if wid == nil { | ||
reportErrorf(errorCouldntFindWallet, string(walletName)) | ||
} | ||
|
||
if err != nil { | ||
reportErrorf(errorCouldntRenameWallet, err) | ||
} |
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 you should check err
first, so you get the more detailed error message.
if bytes.Equal(walletName, newWalletName) { | ||
reportErrorf(errorCouldntRenameWallet, "new name is identical to current name") | ||
} |
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.
Seems like you might as well do this test before interacting with kmd
at all.
Added a goal wrapper to the KMD rename wallet API
Usage:
goal wallet rename [current wallet name] [new wallet name]