commit a12dc8737af8123b0aee9e8c5d681380da467c37
parent 1718ec797327587b4c77a6801c37eebb9aa439d7
Author: Marc Stibane <marc@taler.net>
Date: Thu, 27 Aug 2026 09:19:11 +0200
database-maintenance-progress
Diffstat:
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/TalerWallet1/Backend/WalletCore.swift b/TalerWallet1/Backend/WalletCore.swift
@@ -85,6 +85,16 @@ class WalletCore: QuickjsMessageHandler {
let isInternal: Bool?
let hintTransactionId: String?
let event: [String: AnyCodable]?
+
+ let operation: String? // indexeddb-to-native-migration
+ let phase: String? // fixup | copy | verify | complete | failed
+ let error: TalerErrorDetail? // only when phase is "failed"
+ let step: String? // config | currencyInfo | contacts | mailboxMessages | mailboxConfigurations | contractTerms | tombstones | operationRetries | bankAccounts | globalCurrencyExchanges | globalCurrencyAuditors | exchangeBaseUrlFixups | exchangeBaseUrlMigrationLog | reserves | exchanges | exchangeDetails | exchangeSignKeys | denominationFamilies | denominations | withdrawalGroups | purchases | refreshGroups | coins | planchets | refreshSessions | coinHistory | coinAvailability | refundGroups | tokens | slates | depositGroups | recoupGroups | denomLossEvents | peerPushDebit | peerPushCredit | peerPullDebit | peerPullCredit | donationSummaries | donationPlanchets | donationReceipts | transactionsMeta | refundItems
+ let completedSteps: Int?
+ let totalSteps: Int?
+ let processedRecords: Int?
+ let totalRecords: Int?
+ let completionPercent: Int?
}
deinit {
@@ -377,6 +387,10 @@ extension WalletCore {
case Notification.Name.Idle.rawValue:
// symLog.log(message)
break
+ case Notification.Name.DatabaseMaintenance.rawValue:
+ symLog.log(message)
+ postNotification(.DatabaseMaintenance, userInfo: [NOTIFICATIONPAYLOAD: payload])
+ break
case Notification.Name.ExchangeStateTransition.rawValue:
symLog.log(message)
break
diff --git a/TalerWallet1/Controllers/PublicConstants.swift b/TalerWallet1/Controllers/PublicConstants.swift
@@ -215,12 +215,14 @@ public let NOTIFICATIONPHASE = "notif.phase"
public let NOTIFICATIONANIMATION = "notif.animation"
public let NOTIFICATIONSHARE = "notif.share"
public let NOTIFICATIONPASTE = "notif.paste"
+public let NOTIFICATIONPAYLOAD = "notif.payload"
/// Notifications sent by wallet-core
extension Notification.Name {
static let Idle = Notification.Name("idle")
static let BalanceChange = Notification.Name("balance-change")
static let BankAccountChange = Notification.Name(AccountChange.TransitionType.change.rawValue)
+ static let DatabaseMaintenance = Notification.Name("database-maintenance-progress")
static let ExchangeAdded = Notification.Name("exchange-added")
static let ExchangeDeleted = Notification.Name("exchange-deleted")
static let ExchangeStateTransition = Notification.Name("exchange-state-transition")