-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add AddAmount/SubAmount method to sdk.Coin #9079
Comments
This sounds okay to me, would you like to create a PR? |
@AmauryM Yep, I'll create PR right away. |
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
sdk.Coin
hasAdd()
andSub()
methods but I think it'd be good to haveAddAmount()
andSubAmount()
methods too.Problem Definition
If someone wants to subtract some amount from existing coin, one should right:
But that's a bit redundant that we have to type
existingCoin
twice.We should do it better with:
And it'll improve code readability a lot.
Proposal
Implement
AddAmount()
andSubAmount()
tosdk.Coin
.For Admin Use
The text was updated successfully, but these errors were encountered: