From 984cbb7ab79b50eab38bb6a05ab56ccc278ac835 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Tue, 15 Mar 2022 00:24:39 -0300
Subject: save tos etag after forced refresh

---
 packages/taler-wallet-webextension/src/cta/Withdraw.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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

diff --git a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
index 8535c67eb..f19da3960 100644
--- a/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Withdraw.tsx
@@ -293,11 +293,14 @@ export function WithdrawPageWithParsedURI({
 
   const details = detailsHook.response;
 
-  const onAccept = async (): Promise<void> => {
+  const onAccept = async (accepted: boolean): Promise<void> => {
     if (!exchange) return;
     try {
-      await wxApi.setExchangeTosAccepted(exchange, details.tos.version);
-      setReviewed(true);
+      await wxApi.setExchangeTosAccepted(
+        exchange,
+        accepted ? details.tos.version : undefined,
+      );
+      setReviewed(accepted);
     } catch (e) {
       if (e instanceof Error) {
         //FIXME: uncomment this and display error
-- 
cgit v1.2.3

