From 2dcde31a61b221cb4c7c5cc9fa76bd34493fc168 Mon Sep 17 00:00:00 2001 From: Jay Date: Tue, 16 Apr 2024 10:57:07 +0800 Subject: [PATCH] Maintain darwinia<>crab (#22) --- src/components/transfer-v2.tsx | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/src/components/transfer-v2.tsx b/src/components/transfer-v2.tsx index 10d0e785..81a10ecb 100644 --- a/src/components/transfer-v2.tsx +++ b/src/components/transfer-v2.tsx @@ -220,6 +220,22 @@ function Component() { refreshAllowance, ]); + const alert = useMemo(() => { + if ( + (sourceChain?.network === "darwinia-dvm" && targetChain?.network === "crab-dvm") || + (sourceChain?.network === "crab-dvm" && targetChain?.network === "darwinia-dvm") + ) { + return ( +
+ + The bridge between Darwinia and Crab is undergoing maintenance and will reopen once upgrades are completed. + +
+ ); + } + return null; + }, [sourceChain.network, targetChain.network]); + return ( <>
@@ -261,20 +277,22 @@ function Component() { onChange={setAmount} onRefresh={refreshBalance} /> - + {alert ?? ( + + )}