gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: Adapt Ebics layer to Demobank model.


From: gnunet
Subject: [libeufin] branch master updated: Adapt Ebics layer to Demobank model.
Date: Sat, 23 Oct 2021 10:01:32 +0200

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 2b11a2c  Adapt Ebics layer to Demobank model.
2b11a2c is described below

commit 2b11a2cbef9f342be397c08c2b0811215c033d2b
Author: ms <ms@taler.net>
AuthorDate: Sat Oct 23 10:00:29 2021 +0200

    Adapt Ebics layer to Demobank model.
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt                  | 4 ++++
 .../src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt    | 5 ++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
index 104c5e6..c87097b 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -327,6 +327,10 @@ object BankAccountTransactionsTable : LongIdTable() {
      * only both parties to be registered at the running Sandbox.
      */
     val account = reference("account", BankAccountsTable)
+
+    /**
+     * Redundantly storing the demobank for query convenience.
+     */
     val demobank = reference("demobank", DemobankConfigsTable)
 }
 
diff --git 
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 73ea9ba..c719064 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -660,8 +660,10 @@ private fun handleCct(paymentRequest: String) {
     val parseResult = parsePain001(paymentRequest)
     transaction {
         try {
+            val bankAccount = getBankAccountFromIban(parseResult.debtorIban)
             BankAccountTransactionEntity.new {
-                account = getBankAccountFromIban(parseResult.debtorIban)
+                account = bankAccount
+                demobank = bankAccount.demoBank
                 creditorIban = parseResult.creditorIban
                 creditorName = parseResult.creditorName
                 creditorBic = parseResult.creditorBic
@@ -682,6 +684,7 @@ private fun handleCct(paymentRequest: String) {
             if (maybeLocalCreditor != null) {
                 BankAccountTransactionEntity.new {
                     account = maybeLocalCreditor
+                    demobank = maybeLocalCreditor.demoBank
                     creditorIban = parseResult.creditorIban
                     creditorName = parseResult.creditorName
                     creditorBic = parseResult.creditorBic

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