aboutsummaryrefslogtreecommitdiff
path: root/sandbox/src/main/kotlin/tech/libeufin
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-01-30 14:58:12 +0100
committerFlorian Dold <florian@dold.me>2021-01-30 14:58:43 +0100
commitefe096a3c8c6122f0710d272e60e2e35feb32531 (patch)
tree4b175c9ed47c3ff5414f80232befdf4867626b84 /sandbox/src/main/kotlin/tech/libeufin
parenta4c712759f30fa5b62ca5ed3497680e0fcecc3e5 (diff)
downloadlibeufin-efe096a3c8c6122f0710d272e60e2e35feb32531.tar.gz
libeufin-efe096a3c8c6122f0710d272e60e2e35feb32531.tar.bz2
libeufin-efe096a3c8c6122f0710d272e60e2e35feb32531.zip
make transaction generation work again
Diffstat (limited to 'sandbox/src/main/kotlin/tech/libeufin')
-rw-r--r--sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt6
1 files 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
index 5a21ebbf..b5e6574c 100644
--- 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"
}