Change all references to sdkerrors to new errorsmod and ibcerrors#3186
Merged
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
|
Base automatically changed from
cian/issue#2896-migrate-error-packages
to
main
February 22, 2023 12:07
chatton
commented
Feb 22, 2023
Contributor
Author
chatton
left a comment
There was a problem hiding this comment.
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") |
Contributor
Author
There was a problem hiding this comment.
note: Wrapf was changed to Wrap as there was one argument being passed
| 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]) |
Contributor
Author
There was a problem hiding this comment.
Wrapf was being used but no arg was being passed. I've now passed the duplicate entry.
colin-axner
approved these changes
Feb 27, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
closes: #2896
This PR changes all occurences of
sdkerrors.Wrap/Wrapftoerrorsmod.Wrap/Wrapfand all refersnces to default sdk errors to useibcerrorswhich 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/).godoccomments.Files changedin the Github PR explorer.Codecov Reportin the comment section below once CI passes.