diff --git a/packages/faucet/src/addresses.ts b/packages/faucet/src/addresses.ts index 825de6bf9e..ff836f3a76 100644 --- a/packages/faucet/src/addresses.ts +++ b/packages/faucet/src/addresses.ts @@ -6,9 +6,10 @@ import { fromBech32 } from "@cosmjs/encoding"; export function isValidAddress(input: string, requiredPrefix: string): boolean { try { const { prefix, data } = fromBech32(input); - return ( - prefix === requiredPrefix && input.length >= 8 && input.length <= 90 && data.length >= 4 // 6 chars = 30 bits (3.75 bytes), rounded to whole byte - ); + if (prefix !== requiredPrefix) { + return false; + } + return data.length >= 20 && data.length <= 32; } catch { return false; }