From f7299a1aa0952490629588aa5a853999684b3fb9 Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Wed, 19 Aug 2020 19:39:21 +0530
Subject: make basic withdrawal and payment work again with new API

---
 packages/taler-wallet-webextension/src/pages/withdraw.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/pages/withdraw.tsx')

diff --git a/packages/taler-wallet-webextension/src/pages/withdraw.tsx b/packages/taler-wallet-webextension/src/pages/withdraw.tsx
index 1637176a9..2747dd3f7 100644
--- a/packages/taler-wallet-webextension/src/pages/withdraw.tsx
+++ b/packages/taler-wallet-webextension/src/pages/withdraw.tsx
@@ -43,7 +43,6 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
   const talerWithdrawUri = props.talerWithdrawUri;
   const [cancelled, setCancelled] = useState(false);
   const [selecting, setSelecting] = useState(false);
-  const [customUrl, setCustomUrl] = useState<string>("");
   const [errMsg, setErrMsg] = useState<string | undefined>("");
   const [updateCounter, setUpdateCounter] = useState(1);
 
@@ -58,6 +57,9 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
     const fetchData = async (): Promise<void> => {
       const res = await getWithdrawalDetailsForUri({talerWithdrawUri: props.talerWithdrawUri});
       setDetails(res);
+      if (res.defaultExchangeBaseUrl) {
+        setSelectedExchange(res.defaultExchangeBaseUrl);
+      }
     };
     fetchData();
   }, [selectedExchange, errMsg, selecting, talerWithdrawUri, updateCounter]);
@@ -124,10 +126,6 @@ function WithdrawalDialog(props: { talerWithdrawUri: string }): JSX.Element {
             {i18n.str`Cancel withdraw operation`}
           </span>
         </p>
-
-        {/* {details.exchangeWithdrawDetails ? (
-          <WithdrawDetailView rci={details.exchangeWithdrawDetails} />
-        ) : null} */}
       </div>
     </div>
   );
-- 
cgit v1.2.3

