[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.
- [libeufin] branch master updated (a6661dff -> fe229973), gnunet, 2021/11/10
- [libeufin] 02/08: fix visibility issue, gnunet, 2021/11/10
- [libeufin] 01/08: Finish basic auth implementation., gnunet, 2021/11/10
- [libeufin] 03/08: adapt after wallet tests harness,
gnunet <=
- [libeufin] 06/08: allow longer currency names, gnunet, 2021/11/10
- [libeufin] 07/08: fixes after wallet harness, gnunet, 2021/11/10
- [libeufin] 04/08: Fixes after wallet tests harness., gnunet, 2021/11/10
- [libeufin] 05/08: fix exchange suggestion, gnunet, 2021/11/10
- [libeufin] 08/08: Fixes after wallet tests harness., gnunet, 2021/11/10