gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 09/204: nonZeroBalances


From: gnunet
Subject: [taler-taler-ios] 09/204: nonZeroBalances
Date: Thu, 05 Dec 2024 23:49:37 +0100

This is an automated email from the git hooks/post-receive script.

marc-stibane pushed a commit to branch master
in repository taler-ios.

commit 97c1dc803ef0b1bee3209d537326e2b1ec7133dc
Author: Marc Stibane <marc@taler.net>
AuthorDate: Wed Sep 11 08:15:48 2024 +0200

    nonZeroBalances
---
 TalerWallet1/Model/Model+Balances.swift | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/TalerWallet1/Model/Model+Balances.swift 
b/TalerWallet1/Model/Model+Balances.swift
index 09c5acd..461183e 100644
--- a/TalerWallet1/Model/Model+Balances.swift
+++ b/TalerWallet1/Model/Model+Balances.swift
@@ -39,6 +39,13 @@ struct Balance: Decodable, Hashable, Sendable {
         hasher.combine(flags)
     }
 }
+extension Balance {
+    static func nonZeroBalances(_ balances: [Balance]) -> [Balance] {
+        balances.filter { balance in
+            !balance.available.isZero
+        }
+    }
+}
 // MARK: -
 /// A request to get the balances held in the wallet.
 fileprivate struct Balances: WalletBackendFormattedRequest {

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]