-
Notifications
You must be signed in to change notification settings - Fork 813
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
wallet-http: create account: remove unused 'watch-only' #637
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.
OK.
So in testing, I didn't find a difference in behavior. Using the example at #688 with the addition of: const res = await client.request('PUT', '/wallet/:id/account/:account', {
accountKey: xpub,
watchOnly: false,
type: 'pubkeyhash'
}); The response gave |
I think this makes more sense in the context of this bclient PR: bcoin-org/bclient#15 and #639 Those PRs actually throw errors, this one just cleans up an unused line of code (exactly how you described -- the example creates a watchonly wallet, so all its accounts will be watchonly, regardless of the option you pass) not sure what I meant in comment 1 about feedback to the user -crossing out! |
The commit message still has the now crossed out line, fyi. |
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.
Looks good.
Codecov Report
@@ Coverage Diff @@
## master #637 +/- ##
==========================================
+ Coverage 53.17% 53.33% +0.15%
==========================================
Files 104 104
Lines 27719 27676 -43
Branches 4749 4738 -11
==========================================
+ Hits 14740 14760 +20
+ Misses 12979 12916 -63
Continue to review full report at Codecov.
|
@braydonf removed the comment from the commit message, guess thats from github web interface |
Merged at bb1ce25 |
When a new account is created, it inherits its
watch-only
property from the wallet that contains it.By removing this check, user will get "unrecognized option" error if they try to create an account withCurrently the parameter is just ignored and could cause user confusion.watch-only
.