rooch
rooch copied to clipboard
normalizeRoochAddress bug
const normalizedSender = normalizeRoochAddress(senderAddress);
sender: rooch1yqah54qnf09uer5xpt8cyym2gv97fl0z5cny7pwxf3dvcj8n0umqt5xq9c
normalizedSender: "0xrooch1yqah54qnf09uer5xpt8cyym2gv97fl0z5cny7pwxf3dvcj8n0umqt5xq9c"
Looks like no one was looking on this issue. May start handily later.
Please confirm is #3664 also fixed this. cc @wow-sven
I think that also fixed this issue.
try {
const decode = bech32m.decodeToBytes(input)
return decode.prefix === ROOCH_BECH32_PREFIX && decode.bytes.length === ROOCH_ADDRESS_LENGTH
} catch (_) {
return false
}
The newly added try-catch would resolve this issue.