commit ce65839083b78c806a1a62b6a38192746abb968b
parent c4d95cd14a68ca022b241856718ba29d8d70a2e3
Author: Marc Stibane <marc@taler.net>
Date: Tue, 23 Jun 2026 07:18:35 +0200
refresh discounts & subscriptions with balances
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/TalerWallet1/Model/Model+Balances.swift b/TalerWallet1/Model/Model+Balances.swift
@@ -1,5 +1,5 @@
/*
- * This file is part of GNU Taler, ©2022-25 Taler Systems S.A.
+ * This file is part of GNU Taler, ©2022-26 Taler Systems S.A.
* See LICENSE.md
*/
/**
@@ -114,7 +114,7 @@ struct DiscountsResponse: Decodable, Hashable, Sendable {
let discounts: [TalerToken]
}
-/// A request to get the balances held in the wallet.
+/// A request to get the discounts held in the wallet.
fileprivate struct ListDiscounts: WalletBackendFormattedRequest {
func operation() -> String { "listDiscounts" }
func args() -> Args { Args() }
@@ -139,7 +139,7 @@ struct SubscriptionsResponse: Decodable, Hashable, Sendable {
let subscriptions: [TalerToken]
}
-/// A request to get the balances held in the wallet.
+/// A request to get the subscriptions held in the wallet.
fileprivate struct ListSubscriptions: WalletBackendFormattedRequest {
func operation() -> String { "listSubscriptions" }
func args() -> Args { Args() }
diff --git a/TalerWallet1/Views/Main/WalletMain.swift b/TalerWallet1/Views/Main/WalletMain.swift
@@ -357,6 +357,8 @@ struct WalletMain: View {
.task(id: shouldReloadBalances) { // runs once at launch, then on each onNotification(.BalanceChange)
// symLog.log(".task shouldReloadBalances \(shouldReloadBalances)")
await controller.loadBalances(stack.push("refreshing balances"), model)
+ await controller.loadDiscounts(stack.push("refreshing discounts"), model)
+ await controller.loadSubscriptions(stack.push("refreshing passes"), model)
} // task
} // body
} // Content