Skip to content

Commit

Permalink
Check if the BSC token is on the whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
Lbqds committed Nov 6, 2024
1 parent 998bd2e commit ad985dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bridge_ui/src/hooks/useHandleAttest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import {
parseSequenceFromLogTerra,
uint8ArrayToHex,
parseTargetChainFromLogEth,
CHAIN_ID_ETH
CHAIN_ID_ETH,
CHAIN_ID_BSC
} from "@alephium/wormhole-sdk";
import { CHAIN_ID_UNSET } from "@alephium/wormhole-sdk/lib/esm";
import { Alert } from "@material-ui/lab";
Expand Down Expand Up @@ -72,7 +73,7 @@ import { getSignedVAAWithRetry } from "../utils/getSignedVAAWithRetry";
import parseError from "../utils/parseError";
import { signSendAndConfirm } from "../utils/solana";
import { postWithFees, waitForTerraExecution } from "../utils/terra";
import { attestFromEthWithoutWait, waitEVMTxConfirmed, checkETHToken } from "../utils/evm";
import { attestFromEthWithoutWait, waitEVMTxConfirmed, checkETHToken, checkBSCToken } from "../utils/evm";
import { useWallet, Wallet as AlephiumWallet } from "@alephium/web3-react";
import i18n from "../i18n";

Expand Down Expand Up @@ -143,6 +144,8 @@ async function evm(
try {
if (chainId === CHAIN_ID_ETH) {
await checkETHToken(sourceAsset)
} else if (chainId === CHAIN_ID_BSC) {
await checkBSCToken(sourceAsset)
}

// Klaytn requires specifying gasPrice
Expand Down

0 comments on commit ad985dc

Please sign in to comment.