From 1e5abb5b2aa9545e194f6db879e7480162f6d481 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Fri, 1 Dec 2023 10:09:38 -0300
Subject: exchange account info

---
 .../src/cta/Withdraw/views.tsx                     | 35 +++++++++++-----------
 1 file changed, 18 insertions(+), 17 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx')

diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx
index aa8b58707..d732e60e2 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx
@@ -39,8 +39,7 @@ export function SuccessView(state: State.Success): VNode {
   const { i18n } = useTranslationContext();
   const currentTosVersionIsAccepted =
     state.currentExchange.tosStatus === ExchangeTosStatus.Accepted;
-    const altCurrencies = state.accounts.filter(a => !!a.currencySpecification).map(a => a.currencySpecification!.name)
-    return (
+  return (
     <Fragment>
       <section style={{ textAlign: "left" }}>
         <Part
@@ -67,25 +66,27 @@ export function SuccessView(state: State.Success): VNode {
           kind="neutral"
           big
         />
-        <p>
-          This exchange allows alternative currency
-        </p>
-        <p>
-            <Button
-              variant="outlined"
-            >
-              EUR
-            </Button>
-            <Button
-              variant="outlined"
-            >
-              ARS
-            </Button>
-          </p>
+        {state.chooseCurrencies.length > 0 ?
+          <Fragment>
+            <p>
+              {state.chooseCurrencies.map(currency => {
+                return <Button variant={currency === state.selectedCurrency ? "contained" : "outlined"}
+                  onClick={async () => {
+                    state.changeCurrency(currency)
+                  }}
+                >
+                  {currency}
+                </Button>
+              })}
+            </p>
+          </Fragment>
+          : <Fragment />}
+
         <Part
           title={i18n.str`Details`}
           text={
             <WithdrawDetails
+              conversion={state.conversionInfo?.amount}
               amount={getAmountWithFee(
                 state.toBeReceived,
                 state.chosenAmount,
-- 
cgit v1.2.3

