[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 05/08: fix exchange suggestion
From: |
gnunet |
Subject: |
[libeufin] 05/08: fix exchange suggestion |
Date: |
Wed, 10 Nov 2021 16:22:48 +0100 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 8643676ee4ec92386fdd3771f6b443d13431bee0
Author: ms <ms@taler.net>
AuthorDate: Sat Nov 6 10:00:48 2021 +0100
fix exchange suggestion
---
sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 6 ++++--
sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt | 2 +-
sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 8 +++++---
3 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
index b9863704..73103756 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt
@@ -95,7 +95,8 @@ object DemobankConfigsTable : LongIdTable() {
val bankDebtLimit = integer("bankDebtLimit")
val usersDebtLimit = integer("usersDebtLimit")
val name = text("hostname")
- val suggestedExchange = text("suggestedExchange").nullable()
+ val suggestedExchangeBaseUrl = text("suggestedExchangeBaseUrl").nullable()
+ val suggestedExchangePayto = text("suggestedExchangePayto").nullable()
}
class DemobankConfigEntity(id: EntityID<Long>) : LongEntity(id) {
@@ -105,7 +106,8 @@ class DemobankConfigEntity(id: EntityID<Long>) :
LongEntity(id) {
var bankDebtLimit by DemobankConfigsTable.bankDebtLimit
var usersDebtLimit by DemobankConfigsTable.usersDebtLimit
var name by DemobankConfigsTable.name
- var suggestedExchange by DemobankConfigsTable.suggestedExchange
+ var suggestedExchangeBaseUrl by
DemobankConfigsTable.suggestedExchangeBaseUrl
+ var suggestedExchangePayto by DemobankConfigsTable.suggestedExchangePayto
}
/**
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
index b25741e6..1da00738 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/JSON.kt
@@ -120,7 +120,7 @@ data class TalerWithdrawalStatus(
val selection_done: Boolean,
val transfer_done: Boolean,
val amount: String,
- val wire_types: List<String> = listOf("sepa"),
+ val wire_types: List<String> = listOf("iban"),
val suggested_exchange: String? = null,
val sender_wire: String? = null,
val aborted: Boolean = false,
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index ca6ce8e9..99a99a20 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -101,7 +101,8 @@ class DefaultExchange : CliktCommand("Set default Taler
exchange for a demobank.
helpFormatter = CliktHelpFormatter(showDefaultValues = true)
}
}
- private val exchange by argument("EXCHANGE", "Payto URI of the default
exchange")
+ private val exchangeBaseUrl by argument("EXCHANGE-BASEURL", "base URL of
the default exchange")
+ private val exchangePayto by argument("EXCHANGE-PAYTO", "default
exchange's payto-address")
private val demobank by option("--demobank", help = "Which demobank
defaults to EXCHANGE").default("default")
override fun run() {
@@ -116,7 +117,8 @@ class DefaultExchange : CliktCommand("Set default Taler
exchange for a demobank.
println("Error, demobank ${demobank} not found.")
exitProcess(1)
}
- maybeDemobank.suggestedExchange = exchange
+ maybeDemobank.suggestedExchangeBaseUrl = exchangeBaseUrl
+ maybeDemobank.suggestedExchangePayto = exchangePayto
}
}
}
@@ -1046,7 +1048,7 @@ val sandboxApp: Application.() -> Unit = {
selection_done = wo.selectionDone,
transfer_done = wo.confirmationDone,
amount = "${demobank.currency}:${wo.amount}",
- suggested_exchange = demobank.suggestedExchange
+ suggested_exchange = demobank.suggestedExchangeBaseUrl
)
call.respond(ret)
return@get
--
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, 2021/11/10
- [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 <=
- [libeufin] 08/08: Fixes after wallet tests harness., gnunet, 2021/11/10