[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libeufin] 02/02: remove hard-coded currency
From: |
gnunet |
Subject: |
[libeufin] 02/02: remove hard-coded currency |
Date: |
Mon, 04 Jul 2022 16:22:25 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository libeufin.
commit 6f1c95a87a4bfdcccb725bfa69601e087d27a141
Author: MS <ms@taler.net>
AuthorDate: Mon Jul 4 16:22:17 2022 +0200
remove hard-coded currency
---
.../main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
index 6d145934..4b0ec286 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt
@@ -284,6 +284,7 @@ fun buildCamtString(
val zonedDateTime = creationTime.toZonedString()
val creationTimeMillis = creationTime.toInstant().toEpochMilli()
val messageId = "sandbox-${creationTimeMillis}"
+ val currency = getDefaultDemobank().currency
val camtMessage = constructXml(indent = true) {
root("Document") {
@@ -329,7 +330,7 @@ fun buildCamtString(
text(subscriberIban)
}
element("Ccy") {
- text("EUR")
+ text(currency)
}
element("Ownr/Nm") {
text("Debitor/Owner Name")
@@ -358,7 +359,7 @@ fun buildCamtString(
text("PRCD")
}
element("Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(balancePrcd.abs().toPlainString())
}
element("CdtDbtInd") {
@@ -377,7 +378,7 @@ fun buildCamtString(
text("CLBD")
}
element("Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(balanceClbd.abs().toPlainString())
}
element("CdtDbtInd") {
@@ -452,7 +453,7 @@ fun buildCamtString(
}
}
element("AmtDtls/TxAmt/Amt") {
- attribute("Ccy", "EUR")
+ attribute("Ccy", currency)
text(it.amount)
}
element("BkTxCd") {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.