[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] branch master updated: cash-out info type
From: |
gnunet |
Subject: |
[libeufin] branch master updated: cash-out info type |
Date: |
Tue, 14 Feb 2023 15:18:02 +0100 |
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 aec39ac0 cash-out info type
aec39ac0 is described below
commit aec39ac06ca56a1684651f92c3b3f8be12c1599d
Author: MS <ms@taler.net>
AuthorDate: Tue Feb 14 15:17:06 2023 +0100
cash-out info type
using the same format that /config uses
to show ratios and fees.
---
nexus/src/test/kotlin/SandboxCircuitApiTest.kt | 8 ++++----
.../src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt | 16 +++++++---------
2 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
index bfdfbded..7d6e3944 100644
--- a/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
+++ b/nexus/src/test/kotlin/SandboxCircuitApiTest.kt
@@ -119,10 +119,10 @@ class SandboxCircuitApiTest {
account = "foo"
status = CashoutOperationStatus.PENDING
cashoutAddress = "not used"
- buyAtRatio = "not used"
- buyInFee = "not used"
- sellAtRatio = "not used"
- sellOutFee = "not used"
+ buyAtRatio = "1"
+ buyInFee = "1"
+ sellAtRatio = "1"
+ sellOutFee = "1"
}
}
R = client.get("/demobanks/default/circuit-api/cashouts") {
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
index c1768bf2..d547b428 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt
@@ -98,10 +98,7 @@ data class CashoutOperationInfo(
val tan_channel: SupportedTanChannels,
val account: String,
val cashout_address: String,
- val buy_in_fee: String,
- val buy_at_ratio: String,
- val sell_out_fee: String,
- val sell_at_ratio: String
+ val ratios_and_fees: RatioAndFees
)
data class CashoutConfirmation(val tan: String)
@@ -301,11 +298,12 @@ fun circuitApi(circuitRoute: Route) {
tan_channel = maybeOperation.tanChannel,
account = maybeOperation.account,
cashout_address = maybeOperation.cashoutAddress,
- buy_at_ratio = maybeOperation.buyAtRatio,
- buy_in_fee = maybeOperation.buyInFee,
- sell_at_ratio = maybeOperation.sellAtRatio,
- sell_out_fee = maybeOperation.sellOutFee
-
+ ratios_and_fees = RatioAndFees(
+ buy_in_fee = maybeOperation.buyInFee.toFloat(),
+ buy_at_ratio = maybeOperation.buyAtRatio.toFloat(),
+ sell_out_fee = maybeOperation.sellOutFee.toFloat(),
+ sell_at_ratio = maybeOperation.sellAtRatio.toFloat()
+ )
)
call.respond(ret)
return@get
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libeufin] branch master updated: cash-out info type,
gnunet <=