-
Notifications
You must be signed in to change notification settings - Fork 592
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
imp(apps): added 'WithICS4Wrapper' function to keepers #4187
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4187 +/- ##
==========================================
+ Coverage 79.45% 79.46% +0.01%
==========================================
Files 188 188
Lines 12990 12969 -21
==========================================
- Hits 10321 10306 -15
+ Misses 2240 2234 -6
Partials 429 429
|
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! I think this is a good short term fix until we cleanup middleware wiring. Should we add this for ics29 as well?
In that case, should I add it to icahost too @colin-axner? |
Good question. It's not necessary, but it might be nice to do for consistency sake. It's useful to define the ics4wrapper after generating all the ibc modules. So I would be in favour of doing so, but I can go either way. Happy to wait to hear if others have an opinion next week |
// WithICS4Wrapper sets the ICS4Wrapper. This function may be used after | ||
// the keepers creation to set the middleware which is above this module | ||
// in the IBC application stack. |
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.
Maybe I would try to elaborate a bit more in what circumstances you would use this function.
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 can't think of other circumstances 😅
_, isFeeKeeper := ics4Wrapper.(keeper.Keeper) | ||
suite.Require().False(isFeeKeeper) | ||
|
||
// set the ics4 wrapper to itself (don't do this in production) |
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.
😄
* imp(ica, transfer): added WithICS4Wrapper api function * docs(ica, transfer): updated 'WithICS4Wrapper's godocs * docs(adr8): updated godocs for withics4wrapper * imp(ica/host): removed withics4wrapper from icahost * style(ica, tranfer): ran golanci-lint * imp(ica/controller_test): added WithICS4Wrapper test * imp(transfer_test): added WithICS4Wrapper test * style(transfer_test, ica/controller_test): added spacing to TestWithICS4Wrapper * feat(ica/host): implemented 'WithICS4Wrapper' * feat(fee): implemented 'WithICS4Wrapper' (cherry picked from commit 561eb36) # Conflicts: # modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go # modules/apps/27-interchain-accounts/host/keeper/keeper_test.go # modules/apps/transfer/keeper/keeper.go # modules/apps/transfer/keeper/keeper_test.go
… (#4210) * imp(apps): added 'WithICS4Wrapper' function to keepers (#4187) * imp(ica, transfer): added WithICS4Wrapper api function * docs(ica, transfer): updated 'WithICS4Wrapper's godocs * docs(adr8): updated godocs for withics4wrapper * imp(ica/host): removed withics4wrapper from icahost * style(ica, tranfer): ran golanci-lint * imp(ica/controller_test): added WithICS4Wrapper test * imp(transfer_test): added WithICS4Wrapper test * style(transfer_test, ica/controller_test): added spacing to TestWithICS4Wrapper * feat(ica/host): implemented 'WithICS4Wrapper' * feat(fee): implemented 'WithICS4Wrapper' (cherry picked from commit 561eb36) # Conflicts: # modules/apps/27-interchain-accounts/controller/keeper/keeper_test.go # modules/apps/27-interchain-accounts/host/keeper/keeper_test.go # modules/apps/transfer/keeper/keeper.go # modules/apps/transfer/keeper/keeper_test.go * fix: fixed backport conflicts --------- Co-authored-by: srdtrk <[email protected]> Co-authored-by: srdtrk <[email protected]>
Description
This is first one of the upcoming PRs requested by @colin-axner to reduce the diff when reviewing #3939
This function allows to set the middleware after the keeper's creation.
closes: #XXXX
Commit Message / Changelog Entry
see the guidelines for commit messages. (view raw markdown for examples)
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
Linked to Github issue with discussion and accepted design OR link to spec that describes this work.Updated relevant documentation (docs/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.