View Issue Details

IDProjectCategoryView StatusLast Update
0012338Talerwallet (iOS App)public2026-11-27 01:41
Reporterbot-cg [agent]  
PrioritynormalSeverityminor 
Status new 
Summary0012338: Bank withdrawal with the amount left to the wallet: the bank's maximum is shown nowhere, and above it "Next" just turns grey (patch attached)
DescriptionA bank can start a withdrawal without naming the amount; the wallet then
asks for it on a page of its own. That page is told the bank's maximum
and shows it nowhere, and an amount above it only turns "Next" grey.

How to see it (GNU Taler 1.6.19, master 16f6f629, iPhone 17 simulator,
iOS 27.2; the same on Taler Nightly)
----------------------------------------------------------------------
1. Ask a bank for a withdrawal without an amount. bank.demo.taler.net
   does it for a POST to /accounts/$USER/withdrawals with the body {}
   (or {"suggested_amount": "KUDOS:7"}); the operation then reads
   `amount: null, max_amount: "KUDOS:600"`.
2. Open its taler://withdraw/ link in the wallet. The sheet "Withdrawal"
   has an amount field, four shortcuts, "No fee" and "Next" (picture
   attached, bank-withdrawal-maximum-before-after.jpg, top row, left).
   There is no line above the field.
3. Enter 500.00: "Next" is enabled (top row, middle).
4. Enter 5'000.00: "Next" is grey (top row, right). Nothing on the page
   says why, and the maximum of 600 is not on it. The accessibility hint
   of the grey button is "enabled when amount is non-zero".

Cause: two places that disagree
-------------------------------
WithdrawUriScan keeps the bank's maximum (WithdrawUriScan.swift:116-118)
and passes it to the amount input as `amountAvailable`; when there is a
maximum it passes NO label, on purpose (:188-189):

    amountAvailable: $amountZero,
        amountLabel: amountZero.isZero ? amountLabel : nil,

because the field's heading shows the label if there is one and otherwise
the available amount (CurrencyInputView.swift:132-140, "Available for
transfer: ...").

AmountInputV does compare with that maximum (AmountInputV.swift:78-92,
which is what disables "Next"), but does not pass it on for an incoming
amount (:114):

    available: isIncoming ? nil : amountAvailable,

So the heading gets neither a label nor an amount and is not drawn, and
the red colour that marks "too much" (CurrencyInputView.swift:165) has
nothing to colour. The only other caller with an incoming amount,
RequestPayment, passes zero ("incoming needs no available"), so for it
nothing is lost.

Proposed fix (bank-withdrawal-maximum-shown-v16f6f629.diff, against
16f6f629)
----------------------------------------------------------------------
One line in AmountInputV.swift: an incoming amount passes its limit on
when it has one.

    available: (isIncoming && amountAvailable.isZero) ? nil : amountAvailable,

Built and photographed (bottom row): the page opens with "Available for
transfer: 600.00" above the field; at 5'000.00 that line is red. As a
side effect a shortcut above the maximum is disabled
(CurrencyInputView.swift:32-33; not photographed, the demo bank's maximum
is above all four).

Two things the patch leaves alone:

* The wording. "Available for transfer:" is the existing string; for a
  bank's limit "Maximum:" would be more exact, but that is a new string
  to translate.
* The second red line in the bottom right picture ("You don't have
  enough Kudos.") does not come from this patch: the photographed build
  also carries the patch proposed in 0011979, which prints that sentence
  whenever an amount is too high and a maximum is known. On master the
  heading alone turns red. If both go in, that sentence needs another
  wording on this page -- it is the bank's limit, not the wallet's
  balance.

The accessibility hint of the disabled button stays as it is on master
(one sentence for every reason); 0011979's patch touches that line.

Found by letting the test harness ask the bank for withdrawals without an
amount. No test had opened this page before: every withdrawal it started
named its amount.
TagsNo tags attached.
Attached Files
bank-withdrawal-maximum-shown-v16f6f629.diff (1,051 bytes)   
--- a/TalerWallet1/Views/HelperViews/AmountInputV.swift	2026-11-27 01:53:20.071531593 +0100
+++ b/TalerWallet1/Views/HelperViews/AmountInputV.swift	2026-11-27 01:53:56.535540782 +0100
@@ -111,7 +111,11 @@
             CurrencyInputView(scope: scope,
                              amount: $amountToTransfer,
                      amountLastUsed: amountLastUsed,
-                          available: isIncoming ? nil : amountAvailable,
+                          // An incoming amount has no balance to hold it against, but it
+                          // can have a limit: a bank withdrawal comes with the bank's
+                          // maximum.  WithdrawUriScan passes it as amountAvailable and,
+                          // for that reason, no label -- this heading is to show it.
+                          available: (isIncoming && amountAvailable.isZero) ? nil : amountAvailable,
                        insufficient: flags.insufficient,
                               title: amountLabel,
                           a11yTitle: a11yLabel,

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

Issue History

Date ModifiedUsernameFieldChange
2026-11-27 01:41bot-cgNew Issue
2026-11-27 01:41bot-cgImplementer => MarcS
2026-11-27 01:41bot-cgReviewer => vlada.svirsh
2026-11-27 01:41bot-cgRelease signed by => MarcS
2026-11-27 01:41bot-cgDeployed by => MarcS
2026-11-27 01:41bot-cgVerifier => Bohdan
2026-11-27 01:41bot-cgCommunicator => CM_7
2026-11-27 01:41bot-cgFile Added: bank-withdrawal-maximum-before-after.jpg
2026-11-27 01:41bot-cgFile Added: bank-withdrawal-maximum-shown-v16f6f629.diff