diff --git a/src/components/transfer-action.tsx b/src/components/transfer-action.tsx index 07e1505b5..8db5b2a69 100644 --- a/src/components/transfer-action.tsx +++ b/src/components/transfer-action.tsx @@ -7,13 +7,14 @@ import { Address, isAddress } from "viem"; import { useAccount, useNetwork, useSwitchNetwork } from "wagmi"; interface Props { + forceDisabled?: boolean; recipient: Address | undefined; transferable: bigint | undefined; transferAmount: InputValue; onTransfer: () => void; } -export default function TransferAction({ recipient, transferable, transferAmount, onTransfer }: Props) { +export default function TransferAction({ recipient, transferable, transferAmount, forceDisabled, onTransfer }: Props) { const { sourceAllowance, sourceChain, @@ -105,7 +106,7 @@ export default function TransferAction({ recipient, transferable, transferAmount ]); return ( - ); diff --git a/src/components/transfer.tsx b/src/components/transfer.tsx index 608e544a7..6c1569248 100644 --- a/src/components/transfer.tsx +++ b/src/components/transfer.tsx @@ -65,6 +65,32 @@ export default function Transfer() { const [balanceLoading, setBalanceLoading] = useState(false); const [indexerCategory, setIndexerCategory] = useState(); + const alert = useMemo(() => { + if ( + (sourceChain?.network === "darwinia-dvm" && targetChain?.network === "ethereum") || + (sourceChain?.network === "ethereum" && targetChain?.network === "darwinia-dvm") + ) { + return ( +
+ + {`Due to the Ethereum upgrade, the Darwinia<>Ethereum bridge is temporarily unavailable. Please use the official`} +   + + + Arbitrum bridge + +  {`to route to Darwinia or Ethereum instead.`} +
+ ); + } + return null; + }, [sourceChain?.network, targetChain?.network]); + const bridgeOptions = useMemo( () => getAvailableBridges(sourceChain, targetChain, sourceToken), [sourceChain, targetChain, sourceToken], @@ -349,16 +375,19 @@ export default function Transfer() { {/* Information */} {/* Action */}