commit 5dd08641cdfc0a93d0e3d2c2b3fb275dc925661c parent a12dc8737af8123b0aee9e8c5d681380da467c37 Author: Marc Stibane <marc@taler.net> Date: Thu, 27 Aug 2026 14:13:55 +0200 MigrationResult Diffstat:
| M | TalerWallet1/Model/WalletModel.swift | | | 13 | ++++++++++--- |
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/TalerWallet1/Model/WalletModel.swift b/TalerWallet1/Model/WalletModel.swift @@ -548,17 +548,24 @@ fileprivate struct MigrateRequest: WalletBackendFormattedRequest { struct Args: Encodable { var progressToken: String } - struct Response: Decodable {} // no result - instead there are Notifications + typealias Response = MigrationResult // plus notifications +} + +struct MigrationResult: Decodable { + var migrated: Bool? + var databaseBackend: String? } extension WalletModel { /// reset Wallet-Core - nonisolated func migrateDatabase(viewHandles: Bool = false) async throws { + nonisolated func migrateDatabase(viewHandles: Bool = false) + async throws -> MigrationResult { let request = MigrateRequest() let controller = Controller.shared controller.progressOperation = request.operation controller.progressToken = request.operation - _ = try await sendRequest(request, viewHandles: viewHandles) + let result = try await sendRequest(request, viewHandles: viewHandles) + return result } } // MARK: -