From 9940baafef97ea5c7f859f7e800dac8ecacf8445 Mon Sep 17 00:00:00 2001 From: Jennifer Echenim Date: Mon, 13 May 2024 11:19:39 +0300 Subject: [PATCH] add info on supported bridge --- .../src/components/modules/bridge/index.tsx | 438 ++++++++++-------- 1 file changed, 232 insertions(+), 206 deletions(-) diff --git a/contracts/src/bridge/frontend/src/components/modules/bridge/index.tsx b/contracts/src/bridge/frontend/src/components/modules/bridge/index.tsx index 31e29cfdaa..21ddeeb4bf 100644 --- a/contracts/src/bridge/frontend/src/components/modules/bridge/index.tsx +++ b/contracts/src/bridge/frontend/src/components/modules/bridge/index.tsx @@ -144,59 +144,35 @@ export default function Dashboard() { }; return ( -
- - - Bridge - - You are currently bridging from {isL1ToL2 ? "L1" : "L2"} to{" "} - {isL1ToL2 ? "L2" : "L1"}. - - - - -
- -
-
- Transfer from - {/* From Chain Select */} - ( - - - - - )} - /> -
- -
-
- {/* Token Select */} + <> + {!isL1ToL2 && ( + + + + Sorry! 😔 L2 to L1 bridge is not supported yet. + + + )} +
+ + + Bridge + + You are currently bridging from {isL1ToL2 ? "L1" : "L2"} to{" "} + {isL1ToL2 ? "L2" : "L1"}. + + + + + + +
+
+ Transfer from + {/* From Chain Select */} ( + + + + + + + {tokens.map((token) => ( + + {token.value} + + ))} + + + + + )} + /> + +
+

+ Balance: +

+ + {loading ? : fromTokenBalance || 0} + +
+
+ +
+ {/* Amount Input */} + ( + + + + + + + )} + /> + +
+ {/* Percentage Buttons */} +
+ {PERCENTAGES.map((percentage) => ( + + ))} +
+
- -
- {/* Amount Input */} +
+ + {/* Swap Bridge Tokens */} +
+ +
+ + {/* Transfer to */} +
+
+ Transfer to + {/* To Chain Select */} ( - - - + )} /> +
-
- {/* Percentage Buttons */} -
- {PERCENTAGES.map((percentage) => ( - - ))} + + + Make sure the address is correct before + submitting. + + + + + )} + /> +
+
+
+ + {form.getValues().token} + + +
+

+ You will receive: +

+ + {loading ? : form.watch("amount") || 0} +
-
-
- {/* Swap Bridge Tokens */} -
- -
- - {/* Transfer to */} -
-
- Transfer to - {/* To Chain Select */} - ( - - - - - )} - /> -
- -
- {/* Destination Address Input */} - ( -
-
- - -
- - - - Make sure the address is correct before submitting. - - - -
- )} - /> -
-
-
- - {form.getValues().token} - - -
-

- You will receive: -

- - {loading ? : form.watch("amount") || 0} - -
+
+ Refuel gas +
Not supported
- -
- Refuel gas -
Not supported
+
+ {walletConnected ? ( + + ) : ( + + )}
-
-
- {walletConnected ? ( - - ) : ( - - )} -
- - - - -
+ + + + +
+ ); }