Set Avalanche confirms to 1
This commit is contained in:
parent
af6fa376a6
commit
2c062ef7f3
|
@ -1,4 +1,9 @@
|
||||||
import { ChainId, CHAIN_ID_POLYGON, isEVMChain } from "@certusone/wormhole-sdk";
|
import {
|
||||||
|
ChainId,
|
||||||
|
CHAIN_ID_AVAX,
|
||||||
|
CHAIN_ID_POLYGON,
|
||||||
|
isEVMChain,
|
||||||
|
} from "@certusone/wormhole-sdk";
|
||||||
import { LinearProgress, makeStyles, Typography } from "@material-ui/core";
|
import { LinearProgress, makeStyles, Typography } from "@material-ui/core";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useEthereumProvider } from "../contexts/EthereumProviderContext";
|
import { useEthereumProvider } from "../contexts/EthereumProviderContext";
|
||||||
|
@ -54,7 +59,8 @@ export default function TransactionProgress({
|
||||||
txBlockNumber !== undefined && txBlockNumber && currentBlock
|
txBlockNumber !== undefined && txBlockNumber && currentBlock
|
||||||
? currentBlock - txBlockNumber
|
? currentBlock - txBlockNumber
|
||||||
: 0;
|
: 0;
|
||||||
const expectedBlocks = chainId === CHAIN_ID_POLYGON ? 512 : 15;
|
const expectedBlocks =
|
||||||
|
chainId === CHAIN_ID_POLYGON ? 512 : CHAIN_ID_AVAX ? 1 : 15;
|
||||||
blockDiff = Math.min(Math.max(blockDiff, 0), expectedBlocks);
|
blockDiff = Math.min(Math.max(blockDiff, 0), expectedBlocks);
|
||||||
let value;
|
let value;
|
||||||
let valueBuffer;
|
let valueBuffer;
|
||||||
|
|
Loading…
Reference in New Issue