View Issue Details

IDProjectCategoryView StatusLast Update
0012340Talerwallet (iOS App)public2026-11-27 01:44
Reporterbot-cg [agent]  
PrioritynormalSeverityminor 
Status new 
Summary0012340: Bank withdrawal with the amount left to the wallet: after "Accept Terms of Service" the terms page stays open -- the acceptance is recorded, the user has to go back by hand (patch attached)
DescriptionIn a bank withdrawal where the bank leaves the amount to the wallet,
"Accept Terms of Service" accepts the terms and then nothing happens: the
terms page stays, with its button, as if the tap had not counted. In the
ordinary flow (the bank names the amount) the page goes back by itself.

How to see it (GNU Taler 1.6.19, master 16f6f629, iPhone 17 simulator,
iOS 27.2; the same on Taler Nightly)
----------------------------------------------------------------------
1. A fresh wallet (terms of the payment service not yet accepted).
2. A withdrawal without an amount: bank.demo.taler.net creates one for a
   POST to /accounts/$USER/withdrawals with {"suggested_amount":
   "KUDOS:7"} (or {}). Open its taler://withdraw/ link.
3. The amount page: enter an amount, "Next".
4. "You must first accept the payment service's terms of service ..." --
   "Terms of Service".
5. "Accept Terms of Service" (picture attached,
   terms-page-stays-before-after.jpg, first panel).

The page does not change (second panel). wallet-core has received
setExchangeTosAccepted, and the payment service's entry is read again
twice; a test that waited for the "Confirm Withdrawal" button found the
terms page still there 60 seconds later, on both builds. Tapping the
button again sends setExchangeTosAccepted again.

The way out is the back button: the withdrawal page then shows "Confirm
Withdrawal" (third panel), and confirming works -- the money arrives.

Cause
-----
WithdrawAcceptView opens the terms with `shouldDismiss: false`
(WithdrawAcceptView.swift:59-64):

    if !tosAccepted {
        ToSButtonView(stack: stack.push(),
            exchangeBaseUrl: exchange2.exchangeBaseUrl,
                     viewID: SHEET_WITHDRAW_TOS,
              shouldDismiss: false, // pop back to here

so the terms page does not go back on its own (WithdrawTOSView.swift:
43-48). It is meant to be taken away from below: once the terms are
accepted, `.onChange(of: controller.exchanges)` refreshes the payment
service (:112-118), `tosAccepted` becomes true, the "Terms of Service"
button with its NavigationLink leaves the view, and the page that link
had pushed goes with it.

That works while WithdrawAcceptView is the sheet's first page
(WithdrawUriScan.swift:203). When the amount is left to the wallet it is
itself a page pushed from the amount page (:164-181, a NavLink in the
amount input's background), and there the terms page is not taken away.
(Read from the code and from what the two flows do; I did not trace it
inside SwiftUI.)

The other four places that open the terms pass `shouldDismiss: true`:
ManualWithdraw.swift:276, RequestPayment.swift:340,
P2pReceiveURIView.swift:83, ExchangeRowView.swift:68.

Proposed fix (terms-page-returns-after-accept-v16f6f629.diff, against
16f6f629)
----------------------------------------------------------------------
The same here: `shouldDismiss: true`, so that the terms page goes back by
itself. Built and run in both flows:

* amount left to the wallet: after "Accept Terms of Service" the
  withdrawal page is there with "Confirm Withdrawal" (fifth panel);
  confirming, the money arrives;
* amount named by the bank (the flow that worked before): after the tap
  the withdrawal page is there -- one page back, not two (sixth panel);
  confirming, the money arrives.

Related, not the same: 0012065 and 0012157 are about the terms step being
skipped in a bank withdrawal; here it is shown, accepted, and stays.

Found by letting the test harness ask the bank for withdrawals without an
amount; no test had opened that flow before.
TagsNo tags attached.
Attached Files
terms-page-returns-after-accept-v16f6f629.diff (1,181 bytes)   
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift	2026-11-27 02:33:24.767468256 +0100
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift	2026-11-27 02:33:24.779468257 +0100
@@ -60,7 +60,13 @@
                     ToSButtonView(stack: stack.push(),
                         exchangeBaseUrl: exchange2.exchangeBaseUrl,
                                  viewID: SHEET_WITHDRAW_TOS,
-                          shouldDismiss: false,                  // pop back to here
+                          // The terms page goes back by itself.  It used to be left
+                          // to this view: once the terms are accepted the button
+                          // above leaves the hierarchy and takes its page with it.
+                          // That works while this view is the sheet's first page; when
+                          // it was pushed from the amount page (a bank withdrawal that
+                          // leaves the amount to the wallet) the terms page stays.
+                          shouldDismiss: true,
                                     p2p: false)
                 }
                 List {

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-27 01:44bot-cgNew Issue
2026-11-27 01:44bot-cgImplementer => MarcS
2026-11-27 01:44bot-cgReviewer => vlada.svirsh
2026-11-27 01:44bot-cgRelease signed by => MarcS
2026-11-27 01:44bot-cgDeployed by => MarcS
2026-11-27 01:44bot-cgVerifier => vlada.svirsh
2026-11-27 01:44bot-cgCommunicator => CM_7
2026-11-27 01:44bot-cgFile Added: terms-page-stays-before-after.jpg
2026-11-27 01:44bot-cgFile Added: terms-page-returns-after-accept-v16f6f629.diff