libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 5c1397963a939dbe260226b5076636346c20a308
parent e943ef765147028b88564ff1b5c1c7883843cf97
Author: MS <ms@taler.net>
Date:   Mon, 18 Jan 2021 17:36:10 +0100

Remove avoidable MsgId value per transaction (sandbox)

Diffstat:
Msandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt | 3+--
Msandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt | 1-
Msandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 4----
Msandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt | 3+--
4 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/DB.kt @@ -258,11 +258,10 @@ object BankAccountTransactionsTable : Table() { val currency = text("currency") val date = long("date") val pmtInfId = text("pmtInfId") - val msgId = text("msgId") val direction = text("direction") val account = reference("account", BankAccountsTable) - override val primaryKey = PrimaryKey(pmtInfId, msgId) + override val primaryKey = PrimaryKey(pmtInfId) } /** diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/EbicsProtocolBackend.kt @@ -562,7 +562,6 @@ private fun handleCct(paymentRequest: String, initiatorName: String, ctx: Reques it[currency] = parseResult.currency it[date] = Instant.now().toEpochMilli() it[pmtInfId] = parseResult.pmtInfId - it[msgId] = parseResult.msgId it[direction] = "DBIT" } } catch (e: ExposedSQLException) { diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt @@ -348,7 +348,6 @@ fun serverMain(dbName: String, port: Int) { it[currency] = body.currency it[date] = Instant.now().toEpochMilli() it[pmtInfId] = random.toString() - it[msgId] = random.toString() it[account] = getBankAccountFromIban(localIban).id it[direction] = body.direction } @@ -376,7 +375,6 @@ fun serverMain(dbName: String, port: Int) { it[currency] = account.currency it[date] = Instant.now().toEpochMilli() it[pmtInfId] = random.toString() - it[msgId] = random.toString() it[BankAccountTransactionsTable.account] = account.id it[direction] = "CRDT" } @@ -482,7 +480,6 @@ fun serverMain(dbName: String, port: Int) { it[currency] = account.currency it[date] = Instant.now().toEpochMilli() it[pmtInfId] = random.toString() - it[msgId] = random.toString() it[BankAccountTransactionsTable.account] = account.id it[direction] = "CRDT" } @@ -504,7 +501,6 @@ fun serverMain(dbName: String, port: Int) { it[currency] = account.currency it[date] = Instant.now().toEpochMilli() it[pmtInfId] = random.toString() - it[msgId] = random.toString() it[BankAccountTransactionsTable.account] = account.id it[direction] = "DBIT" } diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt b/sandbox/src/main/kotlin/tech/libeufin/sandbox/bankAccount.kt @@ -45,8 +45,7 @@ fun historyForAccount(iban: String): List<RawPayment> { // uid = "${it[pmtInfId]}-${it[msgId]}" uid = "${it[BankAccountTransactionsTable.pmtInfId]}", direction = it[BankAccountTransactionsTable.direction], - pmtInfId = it[BankAccountTransactionsTable.pmtInfId], - msgId = it[BankAccountTransactionsTable.msgId] + pmtInfId = it[BankAccountTransactionsTable.pmtInfId] ) ) }