Skip to content

Commit

Permalink
return error
Browse files Browse the repository at this point in the history
  • Loading branch information
crodriguezvega committed May 7, 2024
1 parent ecaf37f commit 772c7e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/apps/transfer/types/transfer_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ func validateMemo(ctx sdk.Context, memo string, allowedPacketDataList []string)
dst := &bytes.Buffer{}
err := json.Compact(dst, []byte(allowedMemo))
if err != nil {
errorsmod.Wrapf(ErrInvalidAuthorization, "failed to compact allowed memo: %s", allowedMemo)
return errorsmod.Wrapf(ErrInvalidAuthorization, "failed to compact allowed memo: %s", allowedMemo)
}
compactAllowedMemo := dst.String()

dst = &bytes.Buffer{}
err = json.Compact(dst, []byte(memo))
if err != nil {
errorsmod.Wrapf(ErrInvalidAuthorization, "failed to compact memo: %s", memo)
return errorsmod.Wrapf(ErrInvalidAuthorization, "failed to compact memo: %s", memo)
}
compactMemo := dst.String()

Expand Down

0 comments on commit 772c7e6

Please sign in to comment.