Skip to content

Commit

Permalink
fix: Wrong encoding for evm addresses in search (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmrossy authored Oct 10, 2024
1 parent 38769a7 commit 9cbaca9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/features/messages/queries/encoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
bytesToProtocolAddress,
ensure0x,
isAddress,
isAddressEvm,
strip0x,
} from '@hyperlane-xyz/utils';

Expand All @@ -19,7 +20,7 @@ export function postgresByteaToString(byteString: string): string {
}

export function addressToPostgresBytea(address: Address): string {
const hexString = addressToByteHexString(address);
const hexString = isAddressEvm(address) ? address : addressToByteHexString(address);
return stringToPostgresBytea(hexString);
}

Expand Down

0 comments on commit 9cbaca9

Please sign in to comment.