gnunet-svn
[Top][All Lists]
Advanced

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

[taler-taler-ios] 06/54: Notifications


From: gnunet
Subject: [taler-taler-ios] 06/54: Notifications
Date: Fri, 30 Jun 2023 22:33:38 +0200

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 8074fad762aa570b28016f151be4d4d2c70c5959
Author: Marc Stibane <marc@taler.net>
AuthorDate: Sat Jun 17 14:45:22 2023 +0200

    Notifications
---
 TalerWallet1/Backend/WalletCore.swift | 27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/TalerWallet1/Backend/WalletCore.swift 
b/TalerWallet1/Backend/WalletCore.swift
index c7205a7..6b70b4f 100644
--- a/TalerWallet1/Backend/WalletCore.swift
+++ b/TalerWallet1/Backend/WalletCore.swift
@@ -98,6 +98,7 @@ extension WalletCore {
         if let walletError = decoded.error {            // wallet-core sent an 
error message
             do {
                 let jsonData = try JSONEncoder().encode(walletError)
+                // TODO: Error handling
             } catch {        // JSON encoding of response.result failed / 
should never happen
                 symLog.log(walletError)                 // TODO: .error
                 completion(requestId, timeSent, nil, 
WalletCore.parseFailureError())
@@ -162,6 +163,9 @@ extension WalletCore {
 //            symLog.log("\(pendingOp): \(id)")
         } else if id.hasPrefix("withdraw:") {
             // TODO: handle withdraw
+//            symLog.log("\(pendingOp): \(id)")
+        } else if id.hasPrefix("peer-push-debit:") {
+            // TODO: handle peer-push-debit
 //            symLog.log("\(pendingOp): \(id)")
         } else {
             // TODO: handle other pending-operation-processed
@@ -206,17 +210,16 @@ print("\n❗️ \(pendingOp): \(id)\n")        // this is a 
new pendingOp I have
                     symLog.log(anyPayload)
                     postNotification(.ProposalDownloaded, userInfo: nil)
 
-                case "reserve-registered-with-bank":
-                    symLog.log(anyPayload)
-
-                // TODO: remove these once wallet-core doesn't send them 
anymore
-                case "withdraw-group-finished",
-                     "pay-operation-success",
-                     "withdrawal-group-bank-confirmed",          // replaced 
by transaction-state-transition
-                     "withdrawal-group-reserve-ready",
-                     "coin-withdrawn",                           // totally 
useless since wallet-core handles coins in bulk
-                     "waiting-for-retry",                        // Bla Bla Bla
-                     "refresh-started", "refresh-melted",
+                    // TODO: remove these once wallet-core doesn't send them 
anymore
+//                case "reserve-registered-with-bank":
+//                    symLog.log(anyPayload)
+//                case "withdraw-group-finished",
+//                     "pay-operation-success",
+//                     "withdrawal-group-bank-confirmed",          // replaced 
by transaction-state-transition
+//                     "withdrawal-group-reserve-ready",
+//                     "coin-withdrawn",                           // totally 
useless since wallet-core handles coins in bulk
+//                     "waiting-for-retry",                        // Bla Bla 
Bla
+                case "refresh-started", "refresh-melted",
                      "refresh-revealed", "refresh-unwarranted":
                     break
                 default:
@@ -336,7 +339,7 @@ print("Request \(requestId) took \(millisecs) ms")
                         } else {
                             self.symLog.log(json)       // TODO: .error
                         }
-                        err = error     // this will be thrown
+                        err = error     // this will be thrown, otherwise keep 
nil
                     }
                 } else {
                     if let error = error {

-- 
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]