Set Avalanche confirms to 1

This commit is contained in:
Kevin Peters 2022-05-20 16:26:34 +00:00
parent af6fa376a6
commit 2c062ef7f3
1 changed files with 8 additions and 2 deletions

View File

@ -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 { useEffect, useState } from "react";
import { useEthereumProvider } from "../contexts/EthereumProviderContext";
@ -54,7 +59,8 @@ export default function TransactionProgress({
txBlockNumber !== undefined && txBlockNumber && currentBlock
? currentBlock - txBlockNumber
: 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);
let value;
let valueBuffer;