Skip to content

Commit cdb72b1

Browse files
authored
Make validateAddress cheaper if canonicalization fails (#2193)
1 parent a5b0f3f commit cdb72b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x/wasm/keeper/api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func canonicalizeAddress(human string) ([]byte, uint64, error) {
4848
func validateAddress(human string) (uint64, error) {
4949
canonicalized, err := sdk.AccAddressFromBech32(human)
5050
if err != nil {
51-
return costValidate, err
51+
return costCanonical, err
5252
}
5353
// AccAddressFromBech32 already calls VerifyAddressFormat, so we can just humanize and compare
5454
if canonicalized.String() != human {

0 commit comments

Comments
 (0)