diff --git a/bridge_ui/src/utils/array.ts b/bridge_ui/src/utils/array.ts index 64277e85a..18a7bbd79 100644 --- a/bridge_ui/src/utils/array.ts +++ b/bridge_ui/src/utils/array.ts @@ -6,7 +6,7 @@ import { humanAddress, } from "@certusone/wormhole-sdk"; import { PublicKey } from "@solana/web3.js"; -import { hexValue } from "ethers/lib/utils"; +import { hexValue, hexZeroPad } from "ethers/lib/utils"; export const uint8ArrayToHex = (a: Uint8Array) => Buffer.from(a).toString("hex"); @@ -19,7 +19,7 @@ export const hexToNativeString = (h: string | undefined, c: ChainId) => { : c === CHAIN_ID_SOLANA ? new PublicKey(hexToUint8Array(h)).toString() : c === CHAIN_ID_ETH - ? hexValue(hexToUint8Array(h)) + ? hexZeroPad(hexValue(hexToUint8Array(h)), 20) : c === CHAIN_ID_TERRA ? humanAddress(hexToUint8Array(h.substr(24))) // terra expects 20 bytes, not 32 : h;