From 924da9655544d6ea0e68c7ef0a6dee15d254ce5f Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Mon, 13 Sep 2021 11:14:21 -0400 Subject: [PATCH] bridge_ui: eth register now fix Change-Id: I3523a2e00a7b1e98e62cc3cc59e93ec5669c32bb --- bridge_ui/src/utils/array.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bridge_ui/src/utils/array.ts b/bridge_ui/src/utils/array.ts index 64277e85..18a7bbd7 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;