gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] branch master updated: take currency from demobank


From: gnunet
Subject: [libeufin] branch master updated: take currency from demobank
Date: Sat, 23 Oct 2021 09:46:37 +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 a8a3d0b  take currency from demobank
a8a3d0b is described below

commit a8a3d0bc5f18a3ca404483bede17a58f1f46c88a
Author: ms <ms@taler.net>
AuthorDate: Sat Oct 23 09:46:34 2021 +0200

    take currency from demobank
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 9 +++++----
 util/src/main/kotlin/JSON.kt                          | 4 ++++
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index 5720025..c3fee9f 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -415,10 +415,10 @@ val sandboxApp: Application.() -> Unit = {
             logger.error("Exception while handling '${call.request.uri}'", 
cause)
             call.respondText(
                 "Invalid arithmetic attempted.",
-                io.ktor.http.ContentType.Text.Plain,
+                ContentType.Text.Plain,
                 // here is always the bank's fault, as it should always check
                 // the operands.
-                io.ktor.http.HttpStatusCode.InternalServerError
+                HttpStatusCode.InternalServerError
             )
         }
         exception<SandboxError> { cause ->
@@ -618,12 +618,11 @@ val sandboxApp: Application.() -> Unit = {
                     this.account = account
                     direction = "CRDT"
                     this.demobank = demobank
+                    currency = demobank.currency
                 }
             }
             call.respond(object {})
         }
-
-
         // Associates a new bank account with an existing Ebics subscriber.
         post("/admin/ebics/bank-accounts") {
             val username = call.request.basicAuth()
@@ -758,6 +757,7 @@ val sandboxApp: Application.() -> Unit = {
                         this.account = account
                         direction = "CRDT"
                         this.demobank = demobank
+                        currency = demobank.currency
                     }
                 }
 
@@ -778,6 +778,7 @@ val sandboxApp: Application.() -> Unit = {
                         this.account = account
                         direction = "DBIT"
                         this.demobank = demobank
+                        currency = demobank.currency
                     }
                 }
             }
diff --git a/util/src/main/kotlin/JSON.kt b/util/src/main/kotlin/JSON.kt
index bbd8fb6..ee36b37 100644
--- a/util/src/main/kotlin/JSON.kt
+++ b/util/src/main/kotlin/JSON.kt
@@ -51,6 +51,10 @@ data class IncomingPaymentInfo(
     val debtorIban: String,
     val debtorBic: String?,
     val debtorName: String,
+    /**
+     * A stringified number, no currency required.  This
+     * one will be extracted from the demobank configuration.
+     */
     val amount: String,
     val subject: String
 )

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