gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: nexus fetch: enabling ingestion / UX


From: gnunet
Subject: [libeufin] branch master updated: nexus fetch: enabling ingestion / UX
Date: Sat, 18 Nov 2023 09:20:10 +0100

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

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 55e2588c nexus fetch: enabling ingestion / UX
55e2588c is described below

commit 55e2588ca801da74d80f2b44c47c2602d7a8e2c2
Author: MS <ms@taler.net>
AuthorDate: Sat Nov 18 09:18:52 2023 +0100

    nexus fetch: enabling ingestion / UX
---
 .../src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt  | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt 
b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
index 9e537104..ade51fc8 100644
--- a/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
+++ b/nexus/src/main/kotlin/tech/libeufin/nexus/EbicsFetch.kt
@@ -440,6 +440,7 @@ private suspend fun ingestOutgoingPayment(
     db: Database,
     payment: OutgoingPayment
 ) {
+    logger.debug("Ingesting outgoing payment UID ${payment.bankTransferId}, 
subject ${payment.wireTransferSubject}")
     // Check if the payment was ingested already.
     if (db.isOutgoingPaymentSeen(payment.bankTransferId)) {
         logger.debug("Outgoing payment with UID '${payment.bankTransferId}' 
already seen.")
@@ -452,9 +453,7 @@ private suspend fun ingestOutgoingPayment(
      */
     val initId: Long? = db.initiatedPaymentGetFromUid(payment.bankTransferId);
     if (initId == null)
-        logger.info("Outgoing payment lacks (submitted) initiated " +
-                "counterpart with UID ${payment.bankTransferId}"
-        )
+        logger.info("Outgoing payment lacks initiated counterpart with UID 
${payment.bankTransferId}")
     // store the payment and its (maybe null) linked init
     val insertionResult = db.outgoingPaymentCreate(payment, initId)
     if (insertionResult != OutgoingPaymentOutcome.SUCCESS) {
@@ -477,6 +476,7 @@ private suspend fun ingestIncomingPayment(
     db: Database,
     incomingPayment: IncomingPayment
 ) {
+    logger.debug("Ingesting incoming payment UID: 
${incomingPayment.bankTransferId}, subject: 
${incomingPayment.wireTransferSubject}")
     if (db.isIncomingPaymentSeen(incomingPayment.bankTransferId)) {
         logger.debug("Incoming payment with UID 
'${incomingPayment.bankTransferId}' already seen.")
         return
@@ -527,14 +527,10 @@ fun ingestNotification(
                 logger.debug("Ignoring camt.054: $fileName")
                 return@unzipForEach
             }
-            /**
-             * if (fileName.startsWith(filenamePrefixForIncoming))
-             *     incomingPayments += parseNotificationForIncoming()
-             * else
-             *     outgoingPayments += parseNotificationForOutgoing()
-             *
-             * FIXME: TBD.
-             */
+
+            if (fileName.startsWith(filenamePrefixForIncoming))
+                incomingPayments += parseIncomingTxNotif(xmlContent, 
ctx.cfg.currency)
+            else outgoingPayments += parseOutgoingTxNotif(xmlContent, 
ctx.cfg.currency)
         }
     } catch (e: IOException) {
         logger.error("Could not open any ZIP archive")

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