summaryrefslogtreecommitdiff
path: root/sandbox
diff options
context:
space:
mode:
authorMS <ms@taler.net>2023-02-14 15:17:06 +0100
committerMS <ms@taler.net>2023-02-14 15:17:06 +0100
commitaec39ac06ca56a1684651f92c3b3f8be12c1599d (patch)
treefd904090030e068d2ebb269dfc642fece78dfbd2 /sandbox
parent04a78be85e901b6974434f94b1963472196ec7fc (diff)
downloadlibeufin-aec39ac06ca56a1684651f92c3b3f8be12c1599d.tar.gz
libeufin-aec39ac06ca56a1684651f92c3b3f8be12c1599d.tar.bz2
libeufin-aec39ac06ca56a1684651f92c3b3f8be12c1599d.zip
cash-out info type
using the same format that /config uses to show ratios and fees.
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/src/main/kotlin/tech/libeufin/sandbox/CircuitApi.kt16
1 files changed, 7 insertions, 9 deletions
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