Skip to content

Commit 3fa0a6b

Browse files
authored
Merge pull request #2245 from CosmWasm/mergify/bp/releases/v0.6x/pr-2193
Make `validateAddress` cheaper if canonicalization fails (backport #2193)
2 parents 6655b4a + bee169f commit 3fa0a6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

x/wasm/keeper/api.go

Lines changed: 1 addition & 1 deletion
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)