-
Notifications
You must be signed in to change notification settings - Fork 43
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
refactor(rpc): rename channelbalance to balance #1180
refactor(rpc): rename channelbalance to balance #1180
Conversation
@@ -145,103 +145,103 @@ | |||
|
|||
|
|||
|
|||
<a name="xudrpc.BanRequest"></a> |
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.
Any ideas why BanRequest and BanResponse got involved?
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.
Probably something to do with alphabetic reordering of the rpc calls and messages, not a big deal.
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.
A few comments below. Also for the commit message I think refactor
makes more sense than feat
- and since this affects the rpc layer as well as the cli layer I think it'd be more apt to specify (rpc)
than (cli)
.
proto/xudrpc.proto
Outdated
/* Gets the total balance available across all payment channels for one or all currencies. */ | ||
rpc ChannelBalance(ChannelBalanceRequest) returns (ChannelBalanceResponse) { | ||
/* Gets the total balance available across all payment channels and wallets for one or all currencies. */ | ||
rpc Balance(BalanceRequest) returns (BalanceResponse) { |
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.
"Balance" sounds a little bit ambiguous to me for an API call at least - it almost sounds more like a verb than a noun. How about GetBalance
? I'd be ok with balance
still for the xucli
call for brevity's sake. Thoughts @kilrau?
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! getBalance
for functions is much better than balance
.
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.
GetBalance
👍
@@ -145,103 +145,103 @@ | |||
|
|||
|
|||
|
|||
<a name="xudrpc.BanRequest"></a> |
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.
Probably something to do with alphabetic reordering of the rpc calls and messages, not a big deal.
lib/proto/xudrpc.swagger.json
Outdated
"operationId": "AddCurrency", | ||
"responses": { | ||
"200": { | ||
"description": "", | ||
"description": "A successful response.", |
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.
Can you try following the commands in #1186 and then try regenerating the proto files to see if these changes go away?
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 much better now. Thank you!
d69cff1
to
2c29f40
Compare
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 👍
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.
Just a few minor naming changes, then good to merge. Thanks!
2c29f40
to
5c87184
Compare
5c87184
to
48e8f94
Compare
Thanks for the feedback @sangaman! Made the requested changes. |
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.
Thanks!
@krrprr Will you be following up on modifying the way balances are calculated to reflect total balance as well? I figure we'll want the code to line up with the call naming soon. |
And.. did we ignore I mean honestly, for me either way is fine just that we all agreed on Or was that just on the gRPC layer? If so, that was a misunderstanding: I don't think it's a good idea to have cli and grpc named differently unless there is a really good reason to do so. |
I said I'd be fine with |
Right, not much difference - but they should be the same to avoid confusion. So I'd say let's change it to Sorry for the back and forth! |
Agreed. I'll do so.
Wallet Balance described in #1062 is implemented in #1197. I'll rebase after the balance -> getbalance gets done and merged. Is there a need for Total balance (channel + wallet) or any other value as well? |
|
Right, I didn't notice the updates. Thanks! I'll delve into it probably tomorrow. |
First step for solving #1062