gnunet-svn
[Top][All Lists]
Advanced

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

[libeufin] 01/02: Define suggested Exchange


From: gnunet
Subject: [libeufin] 01/02: Define suggested Exchange
Date: Sun, 19 Sep 2021 09:24:02 +0200

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

ms pushed a commit to branch master
in repository libeufin.

commit c7e8b73d9bc438c3aac270084e5f259323306064
Author: ms <ms@taler.net>
AuthorDate: Sun Sep 19 08:16:51 2021 +0200

    Define suggested Exchange
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index c64e7b7..109fa79 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -81,6 +81,7 @@ import kotlin.system.exitProcess
 private val logger: Logger = LoggerFactory.getLogger("tech.libeufin.sandbox")
 private val hostName: String? = getValueFromEnv("LIBEUFIN_SANDBOX_HOSTNAME")
 private val currencyEnv: String? = getValueFromEnv("LIBEUFIN_SANDBOX_CURRENCY")
+private val envName: String? = getValueFromEnv("TALER_ENV_NAME")
 const val SANDBOX_DB_ENV_VAR_NAME = "LIBEUFIN_SANDBOX_DB_CONNECTION"
 
 data class SandboxError(
@@ -1008,10 +1009,15 @@ fun serverMain(dbName: String, port: Int) {
                         "Withdrawal operation: $wopid not found"
                     )
                 }
+                SandboxAssert(
+                    envName != null,
+                    "Env name not found, cannot suggest Exchange."
+                )
                 val ret = TalerWithdrawalStatus(
                     selection_done = wo.selectionDone,
                     transfer_done = wo.transferDone,
-                    amount = "${currencyEnv}:1"
+                    amount = "${currencyEnv}:1",
+                    suggested_exchange = 
"https://exchange.${envName}.taler.net/";
                 )
                 call.respond(ret)
                 return@get
@@ -1021,7 +1027,7 @@ fun serverMain(dbName: String, port: Int) {
              * as the wire transfer subject, and pays the exchange - which
              * is as well collected in this request.
              */
-            post("/withdrawal-operation/{wopid}") {
+            post("/api/withdrawal-operation/{wopid}") {
                 val wopid: String = ensureNonNull(call.parameters["wopid"])
                 val body = call.receiveJson<TalerWithdrawalConfirmation>()
 

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