From f7cabbf479c9703e4565ae610a68e652ba9e95b5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 21 Mar 2022 11:20:43 -0300 Subject: fix: fixing navigation when trying to pay and there is no balance for that currency --- .../src/wallet/CreateManualWithdraw.tsx | 40 ++++++++++++++++++++-- 1 file changed, 37 insertions(+), 3 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx index bf578dfb5..1996687ba 100644 --- a/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx +++ b/packages/taler-wallet-webextension/src/wallet/CreateManualWithdraw.tsx @@ -67,9 +67,9 @@ export function useComponentState( const initialExchange = foundExchangeForCurrency !== -1 ? exchangeSelectList[foundExchangeForCurrency] - : exchangeSelectList.length > 0 - ? exchangeSelectList[0] - : undefined; + : // : exchangeSelectList.length > 0 + // ? exchangeSelectList[0] + undefined; const [exchange, setExchange] = useState(initialExchange || ""); const [currency, setCurrency] = useState( @@ -137,6 +137,40 @@ export function CreateManualWithdraw({ const state = useComponentState(exchangeList, initialAmount, initialCurrency); if (!state.initialExchange) { + if (initialCurrency !== undefined) { + return ( +
+

+ + Manual Withdrawal for {initialCurrency} + +

+ + + Choose a exchange from where the coins will be withdrawn. The + exchange will send the coins to this wallet after receiving a wire + transfer with the correct subject. + + + + + + No exchange found for {initialCurrency} + + + + Add Exchange + + +
+ ); + } return (

-- cgit v1.2.3