View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012157 | Taler | wallet (iOS App) | public | 2026-11-16 12:16 | 2026-12-02 15:23 |
| Reporter | bot-cg [agent] | ||||
| Implementer | MarcS | ||||
| Priority | normal | Severity | major | ||
| Status | implementing | ||||
| Target Version | 1.7 | ||||
| Summary | 0012157: Withdrawal (bank-integrated): first contact with a payment service can show currency "UNKNOWN", skip the terms of service and offer "Confirm Withdrawal" | ||||
| Description | Scanning or opening a bank-integrated withdrawal link (taler://withdraw/...) for a payment service the wallet has never contacted can show the withdrawal sheet in a half-loaded state that it never leaves: - the currency is shown as "UNKNOWN", - the "You must first accept the payment service's terms" step is missing, - "Confirm Withdrawal" is offered at once. See withdraw-unknown-before.jpg. The sheet stays like this (observed for 60 s). Reproduction (iOS simulator, iOS 27.2, master of 2026-11-15, fresh wallet): open a taler://withdraw/ link whose bank suggests a payment service not yet known to the wallet. With a test exchange that offers ~150 denominations this happened in 3 of 3 attempts; with smaller ones only occasionally (seen twice in earlier fuzzing runs), so it is a race against the first /keys download. Cause (TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift): the view is handed an Exchange entry that was read (getExchangeEntryByUrl) before wallet-core has fetched the payment service. That entry has scopeInfo.currency "UNKNOWN", exchangeUpdateStatus not "ready" and tosStatus "missing-tos". The view computes let tosAccepted = exchange2.tosStatus == .accepted || exchange2.tosStatus == .missingTos // no ToS to accept so "not known yet" is taken for "nothing to accept". viewDidLoad() then calls getWithdrawalDetailsForAmount (which makes wallet-core fetch the service), but the entry is never read again: .task is keyed on exchange?.id, which does not change. From the app log of a failing run: "id":10 prepareBankIntegratedWithdrawal ... took 168 ms "id":16 getCurrencySpecification{"scope":{"currency":"UNKNOWN", ...}} "id":17 getWithdrawalDetailsForAmount{"amount":"EUR:10", ...} took 29 ms (no further request) Consequence: the user can confirm a withdrawal without ever being shown the terms of service. I did not press "Confirm Withdrawal" in the runs above; the "terms of service not accepted" errors (7037) that earlier fuzzing runs logged after Confirm on first-contact withdrawals probably have this origin, but that link is an inference, not something I traced. Proposed patch (attached, withdraw-unknown-exchange.diff): read the entry again after getWithdrawalDetailsForAmount when it was not "ready", and accept "missing-tos" as "no terms" only once the payment service has been fetched. Tested: with the patch the same link shows the terms step, then the amount in EUR, and the withdrawal proceeds to "Authorize at Bank" (withdraw-unknown-after.jpg); a second scenario against another new exchange (withdraw, then pay) also ran through. 2 of 2 with the patch, 3 of 3 failing without. Not tested: an exchange that genuinely has no terms. Found by the UI fuzzing harness (branch dev/bot-cg/fuzzbang, scenario fund-eur). | ||||
| Tags | No tags attached. | ||||
| Attached Files | 12157-withdraw-unknown-exchange.diff (2,375 bytes)
diff --git a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
index c0cb7a66..d1ec1304 100644
--- a/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
+++ b/TalerWallet1/Views/Sheets/WithdrawBankIntegrated/WithdrawAcceptView.swift
@@ -45,6 +45,13 @@ struct WithdrawAcceptView: View {
scope: nil) { // TODO: scope
withdrawalDetails = details
}
+ // The exchange entry this view was handed may have been read before wallet-core
+ // had contacted that payment service for the first time: its currency is then
+ // "UNKNOWN" and its tosStatus "missing-tos". Asking for the withdrawal details
+ // makes wallet-core fetch it, so read the entry again now that it is known.
+ if exchange.exchangeUpdateStatus != .ready {
+ await reloadExchange()
+ }
// agePicker.setAges(ages: details?.ageRestrictionOptions)
} else { // TODO: error
symLog.log("no exchangeBaseUrl or no exchange")
@@ -60,8 +67,13 @@ struct WithdrawAcceptView: View {
ZStack { // there is only _one_ Z item ever - use ZStack to ensure .task is run only _once_ when exchange is switched
if let exchange2 = exchange { // there should always be an exchange...
VStack {
+ // "no ToS to accept" can only be believed once the payment service has been
+ // fetched; before that, missing-tos merely means "not known yet", and treating
+ // it as accepted skipped the terms and offered "Confirm Withdrawal" at once
+ let isFetched = exchange2.exchangeUpdateStatus == .ready
+ || exchange2.exchangeUpdateStatus == .readyUpdate
let tosAccepted = exchange2.tosStatus == .accepted
- || exchange2.tosStatus == .missingTos // no ToS to accept
+ || (exchange2.tosStatus == .missingTos && isFetched) // no ToS to accept
if !tosAccepted {
ToSButtonView(stack: stack.push(),
exchangeBaseUrl: exchange2.exchangeBaseUrl,
| ||||
| Put to | Asked by | Status | Note |
|---|---|---|---|
| Florian Dold | MarcS | waiting for an answer | 30,630 |
| bot-cg [agent] | MarcS | waiting for an answer | 31,007 |
A question is put to one person and moves the issue nowhere: it can be assigned, worked on and implemented with a question open, because whoever asked is the one who knows whether the answer still matters. Several may be open at once. The question itself is the note, so it is formatted, notified and in the record like everything else anybody said here.
| ID | Summary | Status | Locked by | Estimated effort (hours) |
|---|---|---|---|---|
| 0012228 | tosStatus is "missing-tos" for an exchange that has never been contacted; "pending" exists for that and is never returned (patch attached) | implementing | ||
| This issue (hours) | ||||
| Its children (hours) | 0 | |||
| Together (hours) | 0 | |||
Nothing is missing: the plan can be finished.
| parent of | 0012228 | implementing | tosStatus is "missing-tos" for an exchange that has never been contacted; "pending" exists for that and is never returned (patch attached) | |
| related to | 0012065 | reviewing | iOS: bank-integrated withdrawal on a fresh wallet skips the ToS step; "Confirm Withdrawal" then fails with WALLET_EXCHANGE_TOS_NOT_ACCEPTED (stale exchange cache) | |
| Not all the children of this issue are yet resolved or closed. | ||||
| Rechecked against master 42075050 (1.6.19): STILL PRESENT, with a slightly different appearance. Upstream changed this code (854145e9 "use cached exchanges"): WithdrawAcceptView now re-reads the payment service entry when the controller's cache changes. That helps in some runs and not in others. On an unpatched 1.6.19 build, three scenarios opened a bank-integrated withdrawal at a payment service the wallet had never contacted: - EUR exchange, fresh wallet: terms step shown, withdrawal fine; - HARNESSCOIN exchange, fresh wallet: terms step shown, withdrawal fine; - EUR exchange, wallet that already held KUDOS: the sheet shows only the host name and "Confirm Withdrawal" -- no amount, no currency, no terms step -- and stays that way (screenshot withdraw-1.6.19-no-tos-no-amount.jpg, taken 90 s after the sheet opened). So 1 of 3, where the previous master failed 3 of 3. The predicate the report blames is unchanged (WithdrawAcceptView.swift: `tosAccepted = tosStatus == .accepted || tosStatus == .missingTos`), so whenever the entry is still the unfetched one, "Confirm Withdrawal" is offered without the terms. The attached patch (reload after getWithdrawalDetailsForAmount; believe missing-tos only once the entry is fetched) still applies cleanly to 42075050 and is what the fuzzing branch runs with. | |
| Correction to my note above: the third run did NOT start from a wallet that already held KUDOS. I checked the scenario: it starts from a fresh wallet and opens the same kind of EUR withdrawal as the first one. So the accurate statement is: two fresh-wallet withdrawals at the same EUR exchange on unpatched 1.6.19, one showed the terms step and one showed the bare "Confirm Withdrawal" sheet in the screenshot; a third at another exchange was fine. Same start, different outcome -- which fits a race against the first /keys download. | |
| wallet-core should distinguish between unknown-tos (default value before getting an answer from the exchange) and missing-tos (the exchange doesn't have ToS configured, thus the user doesn't need to accept) | |
| Checked master 16f6f629 (commit 3da3fd49, the isFetched condition): on an unpatched build, five bank-integrated withdrawals at payment services the wallet had never contacted (three at an EUR test exchange, two more as the first step of other scenarios, one of them at a second exchange) all showed the terms step before "Confirm Withdrawal". On 1.6.19 one of three had shown the bare sheet. So the symptom this report describes did not occur in 5 of 5; with a race I would not call that proof, but the condition that let "Confirm Withdrawal" through is gone. On your remark about wallet-core: agreed, and I have filed it as 0012228, with a patch. wallet-core derives tosStatus from tosCurrentEtag alone, which is undefined both for "no terms" and for "never fetched"; ExchangeTosStatus.Pending exists for the second case and is never returned. The patch returns "pending" while the entry has no details pointer. With that in wallet-core the isFetched condition in the app would no longer be needed. I accept the rejection of the reload half of my patch (reading the entry directly, past the cache); the fuzzing branch now runs with upstream's version of this file. | |
| Two corrections to my note above, after going through the recordings again. 1. It was six first-contact withdrawals, not five (three at the EUR exchange on their own, two more at the same exchange as the first step of another scenario, one at a second exchange). All six showed the terms step. 2. The terms step is back, but the other half of this report is not gone: in one of the six runs the sheet showed no amount and no currency at any point -- first only the host name with the terms button, and after accepting the terms only the host name with "Confirm Withdrawal". The withdrawal itself then went through with the right amount (EUR 10.00). So on 16f6f629: terms step 6 of 6; amounts missing on the confirmation sheet 1 of 6. That is the state the title calls currency "UNKNOWN", minus the word. | |
| Please try to reproduce the "UNKNOWN" currency again with the latest taler-ios commit. | |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-16 12:16 | bot-cg | New Issue | |
| 2026-11-16 12:16 | bot-cg | Implementer | => MarcS |
| 2026-11-16 12:16 | bot-cg | Reviewer | => avalos |
| 2026-11-16 12:16 | bot-cg | Deployed by | => mikolai |
| 2026-11-16 12:16 | bot-cg | Verifier | => Bohdan |
| 2026-11-16 12:16 | bot-cg | Communicator | => CM_7 |
| 2026-11-16 12:16 | bot-cg | File Added: withdraw-unknown-before.jpg | |
| 2026-11-16 12:16 | bot-cg | File Added: withdraw-unknown-after.jpg | |
| 2026-11-16 12:16 | bot-cg | File Added: 12157-withdraw-unknown-exchange.diff | |
| 2026-11-17 09:23 | Christian Grothoff | Release signed by | => MarcS |
| 2026-11-17 09:23 | Christian Grothoff | Target Version | => 1.7 |
| 2026-11-17 09:24 | Christian Grothoff | Status | new => implementing |
| 2026-11-18 16:03 | bot-cg | Note Added: 0030593 | |
| 2026-11-18 16:03 | bot-cg | File Added: withdraw-1.6.19-no-tos-no-amount.jpg | |
| 2026-11-18 16:03 | bot-cg | Note Added: 0030595 | |
| 2026-11-19 09:18 | Christian Grothoff | Deployed by | mikolai => MarcS |
| 2026-11-19 15:09 | MarcS | Note Added: 0030630 | |
| 2026-11-19 16:07 | MarcS | Relationship added | related to 0012065 |
| 2026-11-19 17:59 | bot-cg | Note Added: 0030641 | |
| 2026-11-19 17:59 | bot-cg | Note Added: 0030644 | |
| 2026-11-21 20:09 | MarcS | Relationship added | parent of 0012228 |
| 2026-12-02 15:23 | MarcS | Note Added: 0031007 |