From 2b6f2040e46edf3c59d0bc9af33760431e3d0119 Mon Sep 17 00:00:00 2001 From: Jesse Snyder Date: Thu, 26 Sep 2024 13:30:58 -0600 Subject: [PATCH] add withdraw back --- .../components/DepositCard/DepositCard.tsx | 34 ++- web/src/components/Dropdown/Dropdown.tsx | 10 +- .../components/WithdrawCard/WithdrawCard.tsx | 200 +++++++++++------- web/src/config/chainConfigs/dusk.ts | 2 +- web/src/pages/BridgePage/BridgePage.tsx | 2 +- web/src/styles/card-customizations.scss | 2 +- 6 files changed, 144 insertions(+), 106 deletions(-) diff --git a/web/src/components/DepositCard/DepositCard.tsx b/web/src/components/DepositCard/DepositCard.tsx index e1e65c5..8cf0b9b 100644 --- a/web/src/components/DepositCard/DepositCard.tsx +++ b/web/src/components/DepositCard/DepositCard.tsx @@ -205,12 +205,6 @@ export default function DepositCard(): React.ReactElement { setAmount(event.target.value); }; - const updateRecipientAddress = ( - event: React.ChangeEvent, - ) => { - setRecipientAddress(event.target.value); - }; - const additionalIbcOptions = useMemo( () => [ { @@ -239,7 +233,7 @@ export default function DepositCard(): React.ReactElement {
-
From
+
From
) : ( -
-
+
+
-
+
)}
-
To
-
+
To
+
-
Amount
-
+
Amount
+
- {!isAmountValid && hasTouchedForm && ( -

- Amount must be a number greater than 0 -

- )}
+ {!isAmountValid && hasTouchedForm && ( +
+ Amount must be a number greater than 0 +
+ )}
-
+
- {fromAddress && ( +
+ {fromAddress && !isLoadingBalance && (

Balance: {balance}

)} + {fromAddress && isLoadingBalance && ( +

+ Balance: +

+ )}
-
- -
- - -

TIA

-
-
- {!isAmountValid && hasTouchedForm && ( -

- Amount must be a number greater than 0 -

- )} -
- {isAnimating ? ( ) : ( -
+
+
+ + + +
+
+
)}
-
+
+
To
+
+ +
+ {selectedIbcChain && ibcCurrencyOptions && ( +
+ +
+ )} +
+
+
+ +
+
+
+ +
+
+
Amount
-
-
- {!isToAddressValid && hasTouchedForm && ( -

- Must be a valid Celestia address -

- )} -
-
- selectIbcChain(selected)} - defaultOption={ibcChainsOptions[0]} + placeholder="0.00" + onChange={updateAmount} + value={amount} /> -
+ {!isAmountValid && hasTouchedForm && ( +
+ Amount must be a number greater than 0 +
+ )}
-
+