commit efe096a3c8c6122f0710d272e60e2e35feb32531
parent a4c712759f30fa5b62ca5ed3497680e0fcecc3e5
Author: Florian Dold <florian@dold.me>
Date: Sat, 30 Jan 2021 14:58:12 +0100
make transaction generation work again
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -443,7 +443,7 @@ fun serverMain(dbName: String, port: Int) {
transaction {
val accountLabel = ensureNonNull(call.parameters["label"])
val account = getBankAccountFromLabel(accountLabel)
-
+ val transactionReference = getRandomString(8)
run {
val random = Random.nextLong(0, Long.MAX_VALUE)
val amount = Random.nextLong(5, 25)
@@ -455,11 +455,11 @@ fun serverMain(dbName: String, port: Int) {
it[debtorIban] = "DE64500105178797276788"
it[debtorBic] = "DEUTDEBB101"
it[debtorName] = "Max Mustermann"
- it[subject] = "sample transaction $random"
+ it[subject] = "sample transaction $transactionReference"
it[BankAccountTransactionsTable.amount] = amount.toString()
it[currency] = account.currency
it[date] = Instant.now().toEpochMilli()
- it[pmtInfId] = random.toString()
+ it[accountServicerReference] = transactionReference
it[BankAccountTransactionsTable.account] = account.id
it[direction] = "CRDT"
}