taler-ios

iOS apps for GNU Taler (wallet)
Log | Files | Refs | README | LICENSE

commit 6b05151248e203e5548c148fc94ef5424629757f
parent 1f03c649ae05ed8c3ef38655d64e986dd7cc60e1
Author: Marc Stibane <marc@taler.net>
Date:   Mon,  3 Aug 2026 19:20:09 +0200

validDetails

Diffstat:
MTalerWallet1/Model/Transaction.swift | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/TalerWallet1/Model/Transaction.swift b/TalerWallet1/Model/Transaction.swift @@ -449,6 +449,17 @@ struct WithdrawalDetails: Decodable { var reservePub: String var reserveIsReady: Bool var exchangeCreditAccountDetails: [ExchangeAccountDetails]? + var validDetails: [ExchangeAccountDetails]? { + if let details = exchangeCreditAccountDetails { + let result = details.filter { detail in + detail.status.lowercased() == "ok" + } + if !result.isEmpty { + return result // guaranteed to have at least 1 item + } + } + return nil + } /// Details for manual withdrawals: var reserveClosingDelay: Duration?