taler-ios

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

commit 381f70c4a80de0323fa8313ec5afea6af6257998
parent 83348269b1d0e820b9121d88a872448681c5647c
Author: Marc Stibane <marc@taler.net>
Date:   Sat, 17 May 2025 17:42:16 +0200

balance for scope

Diffstat:
MTalerWallet1/Controllers/Controller.swift | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/TalerWallet1/Controllers/Controller.swift b/TalerWallet1/Controllers/Controller.swift @@ -167,6 +167,14 @@ class Controller: ObservableObject { return nil } + func balance(for scope: ScopeInfo) -> Balance? { + for balance in balances { + if balance.scopeInfo == scope { + return balance + } + } + return nil + } // MARK: - func exchange(for baseUrl: String) -> Exchange? { for exchange in exchanges {