-
Notifications
You must be signed in to change notification settings - Fork 103
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(x/ecocredit): consistent address field names #1153
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1153 +/- ##
==========================================
- Coverage 69.36% 69.34% -0.02%
==========================================
Files 220 220
Lines 22798 22798
==========================================
- Hits 15814 15810 -4
- Misses 5602 5606 +4
Partials 1382 1382
Flags with carried forward coverage won't be shown. Click here to find out more. |
Generally giving a concept ACK on this. I do think it might be better to try and stay consistent with bank module usage of address where appropriate. So I think:
Might be better to keep as "address" instead of "owner". |
@@ -20,7 +20,7 @@ message SellOrder { | |||
// id is the unique ID of sell order. | |||
uint64 id = 1; | |||
|
|||
// seller is the bytes address of the owner of the credits being sold. | |||
// seller is the address of the account that is selling credits. |
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.
// seller is the address of the account that is selling credits. | |
// seller is the address (in bytes) of the account that is selling credits. |
maybe it still makes sense to explicitly state that its in byte representation?
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 don't think it's necessary. I previously made a change to add something like "unique string identifier" in relation to credit class IDs and it was pointed out that this is excessive because the field clearly states the type. I would have agreed before but I don't think we need to state the type unless we are adding details such as "any arbitrary string".
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.
👍🏻
Description
Closes: #1080
This pull requests makes the following changes to field names:
owner
in relation to sell orders have been renamed toseller
(previously we were usingowner
andseller
but we are usingbuyer
for buy orders andowner
for credits)account
for credit balances have been renamed toaddress
(previously we were usingaccount
andaddress
butaddress
is more in line with the sdk bank module)holder
in relation to credits being cancelled, retired, and bridged have been renamed toowner
(previously we were usingholder
andowner
)This pull request also updates
SellOrdersByAddress
toSellOrdersBySeller
.Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change