-
Notifications
You must be signed in to change notification settings - Fork 61
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
Defensive checks callbacks #875
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #875 +/- ##
==========================================
- Coverage 61.93% 61.89% -0.04%
==========================================
Files 172 172
Lines 14051 14052 +1
==========================================
- Hits 8703 8698 -5
- Misses 4606 4612 +6
Partials 742 742
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -49,6 +49,9 @@ func (k *Keeper) CallbackHandler() Callbacks { | |||
|
|||
// Call calls callback handler. | |||
func (c Callbacks) Call(ctx sdk.Context, id string, args []byte, query icqtypes.Query) error { | |||
if c.Has(id) { |
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 should be negated. arse.
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.
like !if ?
1. Summary
Fixes #842
Adds additional check to avoid nil pointer.
2.Type of change