fix: Wrong encoding for evm addresses in search (#117)

pull/118/head
J M Rossy 2 months ago committed by GitHub
parent 38769a77bc
commit 9cbaca90b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      src/features/messages/queries/encoding.ts

@ -4,6 +4,7 @@ import {
bytesToProtocolAddress, bytesToProtocolAddress,
ensure0x, ensure0x,
isAddress, isAddress,
isAddressEvm,
strip0x, strip0x,
} from '@hyperlane-xyz/utils'; } from '@hyperlane-xyz/utils';
@ -19,7 +20,7 @@ export function postgresByteaToString(byteString: string): string {
} }
export function addressToPostgresBytea(address: Address): string { export function addressToPostgresBytea(address: Address): string {
const hexString = addressToByteHexString(address); const hexString = isAddressEvm(address) ? address : addressToByteHexString(address);
return stringToPostgresBytea(hexString); return stringToPostgresBytea(hexString);
} }

Loading…
Cancel
Save