diff --git a/bridge_ui/src/components/Transfer/TokenWarning.tsx b/bridge_ui/src/components/Transfer/TokenWarning.tsx index 1fdae5c6..11b54707 100644 --- a/bridge_ui/src/components/Transfer/TokenWarning.tsx +++ b/bridge_ui/src/components/Transfer/TokenWarning.tsx @@ -1,10 +1,17 @@ -import { ChainId, CHAIN_ID_ETH, isEVMChain } from "@certusone/wormhole-sdk"; +import { + ChainId, + CHAIN_ID_ETH, + CHAIN_ID_POLYGON, + CHAIN_ID_TERRA, + isEVMChain, +} from "@certusone/wormhole-sdk"; import { Box, Link, makeStyles, Typography } from "@material-ui/core"; import { Alert } from "@material-ui/lab"; import { AVAILABLE_MARKETS_URL, CHAINS_BY_ID, MULTI_CHAIN_TOKENS, + POLYGON_TERRA_WRAPPED_TOKENS, } from "../../utils/consts"; const useStyles = makeStyles((theme) => ({ @@ -14,6 +21,7 @@ const useStyles = makeStyles((theme) => ({ }, alert: { textAlign: "center", + marginTop: theme.spacing(2), }, line: { marginBottom: theme.spacing(2), @@ -84,6 +92,17 @@ function RewardsWarning() { ); } +function PolygonTerraWrappedWarning() { + const classes = useStyles(); + return ( + + Transferring Shuttle wrapped tokens from Polygon will result in double + wrapped (Wormhole wrapped Shuttle wrapped) tokens. There are no liquid + markets for these tokens. + + ); +} + export default function TokenWarning({ sourceChain, sourceAsset, @@ -117,6 +136,9 @@ export default function TokenWarning({ const showMultiChainWarning = isMultiChain && isWormholeWrapped; const showWrappedWarning = !isMultiChain && isWormholeWrapped; //Multichain warning is more important const showRewardsWarning = isRewardsToken; + const showPolygonTerraWrappedWarning = + sourceChain === CHAIN_ID_POLYGON && + POLYGON_TERRA_WRAPPED_TOKENS.includes(searchableAddress); return ( <> @@ -128,6 +150,7 @@ export default function TokenWarning({ ) : null} {showWrappedWarning ? : null} {showRewardsWarning ? : null} + {showPolygonTerraWrappedWarning ? : null} ); } diff --git a/bridge_ui/src/utils/consts.ts b/bridge_ui/src/utils/consts.ts index a13a70ae..6afac187 100644 --- a/bridge_ui/src/utils/consts.ts +++ b/bridge_ui/src/utils/consts.ts @@ -893,3 +893,8 @@ export const getHowToAddToTokenListUrl = (chainId: ChainId) => { export const SOLANA_TOKEN_METADATA_PROGRAM_URL = "https://github.com/metaplex-foundation/metaplex/tree/master/rust/token-metadata/program"; export const MAX_VAA_UPLOAD_RETRIES_SOLANA = 5; + +export const POLYGON_TERRA_WRAPPED_TOKENS = [ + "0x692597b009d13c4049a947cab2239b7d6517875f", // Wrapped UST Token + "0x24834bbec7e39ef42f4a75eaf8e5b6486d3f0e57", // Wrapped LUNA Token +];