From 2c062ef7f3197be89f49a0ad053164ec4d609f18 Mon Sep 17 00:00:00 2001 From: Kevin Peters Date: Fri, 20 May 2022 16:26:34 +0000 Subject: [PATCH] Set Avalanche confirms to 1 --- react/src/components/SwapProgress.tsx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/react/src/components/SwapProgress.tsx b/react/src/components/SwapProgress.tsx index 824b71b..602ab16 100644 --- a/react/src/components/SwapProgress.tsx +++ b/react/src/components/SwapProgress.tsx @@ -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;