-
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
Refactor crisis package using internal #4649
Conversation
Will add a pending entry once review is passed |
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.
utACK
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.
Great refactor @alessio ! I don't think the handler should live on the keeper pkg, check the bank
module structure you made last time for reference. Other than that this lgtm.
Codecov Report
@@ Coverage Diff @@
## master #4649 +/- ##
==========================================
+ Coverage 54.97% 54.98% +<.01%
==========================================
Files 272 271 -1
Lines 17027 17021 -6
==========================================
- Hits 9361 9359 -2
+ Misses 6980 6976 -4
Partials 686 686 |
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, pending clog
only
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 great @alessio. Left some further feedback 👍
x/crisis/internal/keeper/keeper.go
Outdated
// FeeCollectorName returns the name of the FeeCollector module. | ||
func (k Keeper) FeeCollectorName() string { return k.feeCollectorName } | ||
|
||
func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) sdk.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.
The only valid execution of this is to send from an account to k.FeeCollectorName()
only. So I'm thinking we change this to:
func (k Keeper) SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, amt sdk.Coins) sdk.Error {
return k.supplyKeeper.SendCoinsFromAccountToModule(ctx, senderAddr, k.feeCollectorName, amt)
}
x/crisis/internal/keeper/keeper.go
Outdated
func (k Keeper) InvCheckPeriod() uint { return k.invCheckPeriod } | ||
|
||
// FeeCollectorName returns the name of the FeeCollector module. | ||
func (k Keeper) FeeCollectorName() string { return k.feeCollectorName } |
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.
We may not even need this. See below.
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.
ACK
This supersedes #4597
docs/
)clog add [section] [stanza] [message]
Files changed
in the github PR explorerFor Admin Use: