bridge_ui: more migration address check fixes
Change-Id: I9ad85764a79e83039cab8f1515330b58446dd858
This commit is contained in:
parent
784d21bb83
commit
6cd43fdbc8
|
@ -1,5 +1,6 @@
|
|||
import { ChainId, TokenImplementation__factory } from "@certusone/wormhole-sdk";
|
||||
import { Signer } from "@ethersproject/abstract-signer";
|
||||
import { getAddress } from "@ethersproject/address";
|
||||
import { BigNumber } from "@ethersproject/bignumber";
|
||||
import {
|
||||
CircularProgress,
|
||||
|
@ -301,7 +302,9 @@ export default function EvmQuickMigrate({ chainId }: { chainId: ChainId }) {
|
|||
const migratorAddresses = [];
|
||||
for (const tokenAddress of result.keys()) {
|
||||
if (result.get(tokenAddress) && result.get(tokenAddress)?.gt(0)) {
|
||||
const migratorAddress = migrationMap.get(tokenAddress);
|
||||
const migratorAddress = migrationMap.get(
|
||||
getAddress(tokenAddress)
|
||||
);
|
||||
if (migratorAddress) {
|
||||
migratorAddresses.push(migratorAddress);
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ import {
|
|||
CHAIN_ID_BSC,
|
||||
} from "@certusone/wormhole-sdk";
|
||||
import EvmWorkflow from "./EvmWorkflow";
|
||||
import { getAddress } from "@ethersproject/address";
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
mainPaper: {
|
||||
|
@ -90,7 +91,7 @@ const SolanaRoot: React.FC<Migration> = (props) => {
|
|||
const EthereumRoot: React.FC<Migration> = (props) => {
|
||||
const legacyAsset: string = props.match.params.legacyAsset;
|
||||
const assetMap = getMigrationAssetMap(props.chainId);
|
||||
const targetPool = assetMap.get(legacyAsset);
|
||||
const targetPool = assetMap.get(getAddress(legacyAsset));
|
||||
|
||||
let content = null;
|
||||
if (!legacyAsset || !targetPool) {
|
||||
|
|
|
@ -3,6 +3,7 @@ import {
|
|||
CHAIN_ID_ETH,
|
||||
CHAIN_ID_SOLANA,
|
||||
} from "@certusone/wormhole-sdk";
|
||||
import { getAddress } from "@ethersproject/address";
|
||||
import { Button, makeStyles, MenuItem, TextField } from "@material-ui/core";
|
||||
import { useCallback } from "react";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
@ -60,11 +61,11 @@ function Source() {
|
|||
const isEthereumMigration =
|
||||
sourceChain === CHAIN_ID_ETH &&
|
||||
!!parsedTokenAccount &&
|
||||
!!ETH_MIGRATION_ASSET_MAP.get(parsedTokenAccount.mintKey);
|
||||
!!ETH_MIGRATION_ASSET_MAP.get(getAddress(parsedTokenAccount.mintKey));
|
||||
const isBscMigration =
|
||||
sourceChain === CHAIN_ID_BSC &&
|
||||
!!parsedTokenAccount &&
|
||||
!!BSC_MIGRATION_ASSET_MAP.get(parsedTokenAccount.mintKey);
|
||||
!!BSC_MIGRATION_ASSET_MAP.get(getAddress(parsedTokenAccount.mintKey));
|
||||
const isMigrationAsset =
|
||||
isSolanaMigration || isEthereumMigration || isBscMigration;
|
||||
const uiAmountString = useSelector(selectTransferSourceBalanceString);
|
||||
|
|
Loading…
Reference in New Issue