gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 03/08: adapt after wallet tests harness


From: gnunet
Subject: [libeufin] 03/08: adapt after wallet tests harness
Date: Wed, 10 Nov 2021 16:22:46 +0100

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

ms pushed a commit to branch master
in repository libeufin.

commit eda347129bb27eb75089e84f48d9afc10d79f497
Author: ms <ms@taler.net>
AuthorDate: Fri Nov 5 23:55:13 2021 +0100

    adapt after wallet tests harness
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt |  8 ++++----
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt    | 11 ++++++++---
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt
index ef96cf8f..fdccb74e 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Helpers.kt
@@ -303,11 +303,11 @@ fun getBankAccountFromLabel(label: String, demobank: 
DemobankConfigEntity): Bank
     return transaction {
         BankAccountEntity.find(
             BankAccountsTable.label eq label and (BankAccountsTable.demoBank 
eq demobank.id)
+        ).firstOrNull() ?: throw SandboxError(
+            HttpStatusCode.NotFound,
+            "Did not find a bank account for label ${label}"
         )
-    }.firstOrNull() ?: throw SandboxError(
-        HttpStatusCode.NotFound,
-        "Did not find a bank account for label ${label}"
-    )
+    }
 }
 
 fun getBankAccountFromSubscriber(subscriber: EbicsSubscriberEntity): 
BankAccountEntity {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index efafcc99..9b5d4c5a 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -1111,11 +1111,11 @@ val sandboxApp: Application.() -> Unit = {
                             "taler".plus(if (baseUrl.protocol.lowercase() == 
"http") "+http" else ""),
                             -1
                         )
-                        pathComponents(baseUrl.path, "access-api", 
wo.wopid.toString())
+                        pathComponents(baseUrl.path, wo.wopid.toString())
                         encodedPath += "/"
                     }
                     call.respond(object {
-                        val withdrawal_id = wo.id.value
+                        val withdrawal_id = wo.id.value.toString()
                         val taler_withdraw_uri = withdrawUri
                     })
                     return@post
@@ -1271,7 +1271,12 @@ val sandboxApp: Application.() -> Unit = {
                     transaction {
                         BankAccountEntity.new {
                             iban = getIban()
-                            label = req.username + "-acct" // multiple 
accounts per username not allowed.
+                            /**
+                             * For now, keep same semantics of Pybank: a 
username
+                             * is AS WELL a bank account label.  In other 
words, it
+                             * identifies a customer AND a bank account.
+                             */
+                            label = req.username
                             owner = req.username
                             this.demoBank = demobank
                         }

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