-
Notifications
You must be signed in to change notification settings - Fork 404
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
Check coin sendable status #446
Conversation
Codecov Report
@@ Coverage Diff @@
## master #446 +/- ##
==========================================
+ Coverage 55.51% 55.63% +0.11%
==========================================
Files 39 39
Lines 4305 4312 +7
==========================================
+ Hits 2390 2399 +9
+ Misses 1713 1712 -1
+ Partials 202 201 -1
|
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
|
||
// TransferCoins transfers coins from source to destination account when coin send was enabled for them and the recipient | ||
// is not in the blocked address list. | ||
func (c CoinTransferrer) TransferCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error { |
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.
This adds the logic well.
I was wondering about the abstraction here and why we don't just use the msg service. But maybe that requires a much larger refactor? Also the reasoning for your interfaces usually becomes clear to me a few weeks later, so I trust you on this one.
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 but this might be over engineered. Keep challenging me. :-)
Main motivation was to not get into the type conversions for address and context (yet).
Very nice to see this resolved. 🥳 |
Fixes #414
This also includes some minor refactoring towards interfaces in
Keeper
and an extension point to customize the SendCoins precondition checks