From 2fd4481b041f946431004e40c7a4ffcdd620a9cb Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Thu, 14 Dec 2023 07:20:47 -0300
Subject: refactor ToS display

---
 .../taler-wallet-webextension/src/cta/Withdraw/views.tsx    | 13 ++++---------
 1 file changed, 4 insertions(+), 9 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 d732e60e2..748b65817 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw/views.tsx
@@ -37,8 +37,8 @@ import { AmountField } from "../../components/AmountField.js";
 
 export function SuccessView(state: State.Success): VNode {
   const { i18n } = useTranslationContext();
-  const currentTosVersionIsAccepted =
-    state.currentExchange.tosStatus === ExchangeTosStatus.Accepted;
+  // const currentTosVersionIsAccepted =
+  //   state.currentExchange.tosStatus === ExchangeTosStatus.Accepted;
   return (
     <Fragment>
       <section style={{ textAlign: "left" }}>
@@ -109,7 +109,7 @@ export function SuccessView(state: State.Success): VNode {
       </section>
 
       <section>
-        {currentTosVersionIsAccepted ? (
+        <TermsOfService exchangeUrl={state.currentExchange.exchangeBaseUrl}>
           <Button
             variant="contained"
             color="success"
@@ -120,12 +120,7 @@ export function SuccessView(state: State.Success): VNode {
               Withdraw &nbsp; <Amount value={state.toBeReceived} />
             </i18n.Translate>
           </Button>
-        ) : (
-          <TermsOfService
-            exchangeUrl={state.currentExchange.exchangeBaseUrl}
-            onChange={state.onTosUpdate}
-          />
-        )}
+        </TermsOfService>
       </section>
       {state.talerWithdrawUri ? (
         <WithdrawWithMobile talerWithdrawUri={state.talerWithdrawUri} />
-- 
cgit v1.2.3

