bridge_ui: eth register now fix
Change-Id: I3523a2e00a7b1e98e62cc3cc59e93ec5669c32bb
This commit is contained in:
parent
72ad795cb2
commit
924da96555
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue