commit 1601704b54e06ec30e16e39741b2c50cee254599
parent 312100add5714424636d9cbe07af9e1df7fb7d34
Author: Antoine A <>
Date: Wed, 4 Feb 2026 13:26:40 +0100
libeufin: add list incomplete cmd
Diffstat:
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/cli/List.kt b/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/cli/List.kt
@@ -1,6 +1,6 @@
/*
* This file is part of LibEuFin.
- * Copyright (C) 2025 Taler Systems S.A.
+ * Copyright (C) 2025, 2026 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
@@ -54,9 +54,15 @@ private fun fmtPayto(payto: String): String {
class ListIncoming: TalerCmd("incoming") {
override fun help(context: Context) = "List incoming transactions"
+ private val incomplete by option(
+ "--incomplete",
+ help = "Only list transactions that are incomplete",
+ ).flag()
+
+
override fun run() = cliCmd(logger) {
nexusConfig(config).withDb { db, cfg ->
- val txs = db.list.incoming()
+ val txs = db.list.incoming(incomplete)
for (tx in txs) {
println(buildString{
if (tx.creditFee.isZero()) {
diff --git a/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/db/ListDAO.kt b/libeufin-nexus/src/main/kotlin/tech/libeufin/nexus/db/ListDAO.kt
@@ -1,6 +1,6 @@
/*
* This file is part of LibEuFin.
- * Copyright (C) 2024-2025 Taler Systems S.A.
+ * Copyright (C) 2024, 2025, 2026 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
@@ -29,7 +29,7 @@ import java.util.UUID
/** Data access logic for metadata listing */
class ListDAO(private val db: Database) {
/** List incoming transaction metadata for debugging */
- suspend fun incoming(): List<IncomingTxMetadata> = db.serializable(
+ suspend fun incoming(incomplete: Boolean): List<IncomingTxMetadata> = db.serializable(
"""
SELECT
(incoming.amount).val AS amount_val
@@ -49,6 +49,7 @@ class ListDAO(private val db: Database) {
LEFT JOIN talerable_incoming_transactions USING (incoming_transaction_id)
LEFT JOIN bounced_transactions USING (incoming_transaction_id)
LEFT JOIN initiated_outgoing_transactions USING (initiated_outgoing_transaction_id)
+ ${if (incomplete) { "WHERE debit_payto IS NULL OR incoming.subject IS NULL" } else { ""}}
ORDER BY execution_time
"""
) {