rooch icon indicating copy to clipboard operation
rooch copied to clipboard

normalizeRoochAddress bug

Open jolestar opened this issue 5 months ago • 3 comments

const normalizedSender = normalizeRoochAddress(senderAddress);
sender: rooch1yqah54qnf09uer5xpt8cyym2gv97fl0z5cny7pwxf3dvcj8n0umqt5xq9c
normalizedSender: "0xrooch1yqah54qnf09uer5xpt8cyym2gv97fl0z5cny7pwxf3dvcj8n0umqt5xq9c"

jolestar avatar Jul 17 '25 09:07 jolestar

Looks like no one was looking on this issue. May start handily later.

Please confirm is #3664 also fixed this. cc @wow-sven

jolestar avatar Aug 19 '25 04:08 jolestar

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.