-
Notifications
You must be signed in to change notification settings - Fork 624
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
Change all references to sdkerrors to new errorsmod and ibcerrors #3186
Conversation
…#2896-use-new-errors
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3186 +/- ##
=======================================
Coverage 78.60% 78.60%
=======================================
Files 177 177
Lines 12410 12420 +10
=======================================
+ Hits 9755 9763 +8
- Misses 2230 2231 +1
- Partials 425 426 +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.
There were two linting errors that were also resolved here, I highlighted them as they are difficult to pick out in a diff like this.
} | ||
|
||
if !isAllowedAddress(ctx, msgTransfer.Receiver, allocation.AllowList) { | ||
return authz.AcceptResponse{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidAddress, "not allowed address for transfer") | ||
return authz.AcceptResponse{}, errorsmod.Wrap(ibcerrors.ErrInvalidAddress, "not allowed address for transfer") |
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.
note: Wrapf was changed to Wrap as there was one argument being passed
} | ||
|
||
found := make(map[string]bool, 0) | ||
for i := 0; i < len(allocation.AllowList); i++ { | ||
if found[allocation.AllowList[i]] { | ||
return sdkerrors.Wrapf(ErrInvalidAuthorization, "duplicate entry in allow list %s") | ||
return errorsmod.Wrapf(ErrInvalidAuthorization, "duplicate entry in allow list %s", allocation.AllowList[i]) |
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.
Wrapf was being used but no arg was being passed. I've now passed the duplicate entry.
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 to me! 🙏
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.
Fabulous work @chatton! 🐎
Description
closes: #2896
This PR changes all occurences of
sdkerrors.Wrap/Wrapf
toerrorsmod.Wrap/Wrapf
and all refersnces to default sdk errors to useibcerrors
which were added in #3184.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.
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.