libeufin

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

commit 665b8f15eae8d612264c239572641d3ccae1a38f
parent 1a41dcd2ff3401ae7c6bf321a58b54f748c04b17
Author: Antoine A <>
Date:   Mon,  6 Jan 2025 10:16:27 +0100

common: code cleanup

Diffstat:
Mbank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt | 6+++---
Mcommon/src/main/kotlin/TalerConfig.kt | 4++--
Mcommon/src/test/kotlin/ConfigTest.kt | 2+-
Mtestbench/src/main/kotlin/Main.kt | 13++++++++++++-
4 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt @@ -1,6 +1,6 @@ /* * This file is part of LibEuFin. - * Copyright (C) 2023-2024 Taler Systems S.A. + * Copyright (C) 2023-2025 Taler Systems S.A. * LibEuFin is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -198,7 +198,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { call.addIncoming( amount = req.amount, debitAccount = req.debit_account, - subject = "Manual incoming ${req.reserve_pub}", + subject = "Admin incoming ${req.reserve_pub}", metadata = TalerIncomingMetadata(TalerIncomingType.reserve, req.reserve_pub) ) } @@ -207,7 +207,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { call.addIncoming( amount = req.amount, debitAccount = req.debit_account, - subject = "Manual incoming KYC:${req.account_pub}", + subject = "Admin incoming KYC:${req.account_pub}", metadata = TalerIncomingMetadata(TalerIncomingType.kyc, req.account_pub) ) } diff --git a/common/src/main/kotlin/TalerConfig.kt b/common/src/main/kotlin/TalerConfig.kt @@ -1,6 +1,6 @@ /* * This file is part of LibEuFin. - * Copyright (C) 2023-2024 Taler Systems S.A. + * Copyright (C) 2023-2025 Taler Systems S.A. * * LibEuFin is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -468,7 +468,7 @@ class TalerConfigSection internal constructor( when (it.lowercase()) { "yes" -> true "no" -> false - else -> throw ValueError("expected 'yes' or 'no' got '$it'") + else -> throw ValueError("expected 'YES' or 'NO' got '$it'") } } diff --git a/common/src/test/kotlin/ConfigTest.kt b/common/src/test/kotlin/ConfigTest.kt @@ -197,7 +197,7 @@ class ConfigTest { "boolean", TalerConfigSection::boolean, listOf( listOf("yes", "YES", "Yes") to true, listOf("no", "NO", "No") to false - ), listOf("true", "1") to { "expected 'yes' or 'no' got '$it'" } + ), listOf("true", "1") to { "expected 'YES' or 'NO' got '$it'" } ) @Test diff --git a/testbench/src/main/kotlin/Main.kt b/testbench/src/main/kotlin/Main.kt @@ -1,6 +1,6 @@ /* * This file is part of LibEuFin. - * Copyright (C) 2023-2024 Taler Systems S.A. + * Copyright (C) 2023-2025 Taler Systems S.A. * * LibEuFin is free software; you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as @@ -214,6 +214,17 @@ class Cli : CliktCommand() { put("wss", "Listen to notification over websocket", "testing wss $debugFlags") put("submit", "Submit pending transactions", "ebics-submit $ebicsFlags") put("export", "Export pending batches as pain001 messages", "manual export $flags payments.zip") + putArgs("import", "Import xml files in root directory") { + buildString { + append("manual import $flags ") + for (file in Path("..").listDirectoryEntries()) { + if (file.extension == "xml") { + append(file) + append(" ") + } + } + } + } put("setup", "Setup", "ebics-setup $debugFlags") putArgs("status", "Set batch or transaction status") { "manual status $flags " + it.joinToString(" ")