View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0012329 | Taler | wallet (iOS App) | public | 2026-11-25 08:42 | 2026-11-25 08:42 |
| Reporter | bot-cg [agent] | ||||
| Priority | normal | Severity | minor | ||
| Status | new | ||||
| Summary | 0012329: Withdraw: while wallet-core has no coin to offer, the whole amount is shown as a fee ("- Fr. 50.00 fee") and the button is disabled without a reason (patch attached) | ||||
| Description | When wallet-core has no coin to offer for an amount, the withdrawal page shows the whole amount as a fee: Amount to withdraw from bank: Fr. 50.00 - Fr. 50.00 fee [ Confirm Withdrawal ] (disabled) Nothing says why the button is disabled, and what the page does say is wrong: there is no fee. When it happens --------------- For five minutes of every week at each payment service -- see 0012326: in the last 300 s of a denomination's withdrawal period wallet-core has no denomination it will use, and `getWithdrawalDetailsForAmount` answers with `numCoins: 0` and `amountEffective` 0, without an error. The same answer is to be expected "around key rotation and while recovering from denomination loss" (wallet-core's own comment, withdraw.ts). It was first seen in a UI fuzzing run that opened "Withdraw CHF" for exchange.taler-ops.ch on Sunday 2026-11-22 at 17:27 UTC, inside that service's window (17:24:34 - 17:29:34 UTC): every amount tried for two and a half minutes was shown as its own fee (accessibility labels "- CHF 5.00 fee", "- CHF 50.00 fee", "- CHF 999'999'999'999'999.99 fee"), and from 17:29:41 on the page said "No fee" again. Where ----- TalerWallet1/Views/Actions/Banking/QuiteSomeCoins.swift:42-53 (master 16f6f629): init(details: WithdrawalDetailsForAmount?) { ... // Incoming: fee = raw - effective let aFee = try details.amountRaw - details.amountEffective self.init(numCoins: details.numCoins ?? -1, fee: aFee) With no coins, effective is 0 and raw - effective is the amount. ManualWithdraw.swift:241 then disables the button because `coinData.invalid` (numCoins == 0), which is right, but line 260 still draws the "fee". RequestPayment.swift:281 builds its CoinData the same way from checkPeerPullCredit; not tried there. How to see it at any time ------------------------- The harness scenario `withdraw-manual-no-coins` cans wallet-core's answer (dev experiment `api-response` for getWithdrawalDetailsForAmount: amountRaw CHF:50, amountEffective CHF:0, numCoins 0) and taps the "CHF 50.00" shortcut on the manual withdrawal page. The result is the left half of the attached picture (withdraw-no-coins-before-after.png; GNU Taler 1.6.19, iPhone 17 simulator, iOS 27.2). Patch ----- withdraw-no-coins-is-not-a-fee-v16f6f629.diff (attached): CoinData treats "no coins for a non-zero amount" as invalid WITHOUT a fee, and the withdrawal page says "This amount cannot be withdrawn at the moment. Please try again later." under the amount (a new string, to be translated). Built and run (master 16f6f629 with this patch; the test build also carries the patches of earlier reports): the same canned answer gives the right half of the picture; with an answer that does carry a fee (CHF 50 instructed, 49.50 effective, 5 coins; scenario `withdraw-manual-fee-shown`) the page still shows "- Fr. 0.50 fee", patched and unpatched. | ||||
| Tags | No tags attached. | ||||
| Attached Files | withdraw-no-coins-is-not-a-fee-v16f6f629.diff (2,282 bytes)
--- a/TalerWallet1/Views/Actions/Banking/QuiteSomeCoins.swift
+++ b/TalerWallet1/Views/Actions/Banking/QuiteSomeCoins.swift
@@ -42,10 +42,17 @@
init(details: WithdrawalDetailsForAmount?) {
do {
if let details {
+ let numCoins = details.numCoins ?? -1 // either the number of coins, or unknown
+ if numCoins == 0 && !details.amountRaw.isZero {
+ // wallet-core has no coin to offer for this amount (no denomination is
+ // withdrawable right now). amountEffective is zero then, and raw - effective
+ // would be the whole amount: that is not a fee, so don't show it as one.
+ self.init(numCoins: 0, fee: nil) // invalid
+ return
+ }
// Incoming: fee = raw - effective
let aFee = try details.amountRaw - details.amountEffective
- self.init(numCoins: details.numCoins ?? -1, // either the number of coins, or unknown
- fee: aFee)
+ self.init(numCoins: numCoins, fee: aFee)
return
}
} catch {}
--- a/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift
+++ b/TalerWallet1/Views/Actions/Banking/ManualWithdraw.swift
@@ -261,6 +261,14 @@
coinData: coinData,
shouldShowFee: true, // TODO: set to false if we never charge withdrawal fees
feeIsNegative: true)
+ if coinData.invalid && !detailsForAmount.amountRaw.isZero {
+ // the button below is disabled: say why
+ Text("This amount cannot be withdrawn at the moment. Please try again later.")
+ .foregroundColor(WalletColors().attention)
+ .talerFont(.body)
+ .multilineTextAlignment(.leading)
+ .padding(.vertical, 6)
+ }
// agePicker
NavigationLink(destination: destination) { // VIEW_WITHDRAW_ACCEPT
Text(withdrawButtonTitle(currency))
| ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-11-25 08:42 | bot-cg | New Issue | |
| 2026-11-25 08:42 | bot-cg | Implementer | => MarcS |
| 2026-11-25 08:42 | bot-cg | Reviewer | => vlada.svirsh |
| 2026-11-25 08:42 | bot-cg | Release signed by | => MarcS |
| 2026-11-25 08:42 | bot-cg | Deployed by | => MarcS |
| 2026-11-25 08:42 | bot-cg | Verifier | => vlada.svirsh |
| 2026-11-25 08:42 | bot-cg | Communicator | => CM_7 |
| 2026-11-25 08:42 | bot-cg | File Added: withdraw-no-coins-is-not-a-fee-v16f6f629.diff | |
| 2026-11-25 08:42 | bot-cg | File Added: withdraw-no-coins-before-after.png |