From 4cd5b96aeda94cc27fdb85c8dc0c4e1bfb99cbc2 Mon Sep 17 00:00:00 2001 From: ok300 <106775972+ok300@users.noreply.github.com> Date: Mon, 8 Jul 2024 11:07:54 +0000 Subject: [PATCH] Update list-payments: exclude chain swap refunds (#366) If not excluded, they appear as separate Receive payments. --- lib/core/src/persist/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/core/src/persist/mod.rs b/lib/core/src/persist/mod.rs index 4b317a99c..d5452fba3 100644 --- a/lib/core/src/persist/mod.rs +++ b/lib/core/src/persist/mod.rs @@ -169,8 +169,10 @@ impl Persister { ON ptx.tx_id in (cs.user_lockup_tx_id, cs.claim_tx_id) LEFT JOIN payment_tx_data AS rtx -- Refund tx data ON rtx.tx_id in (ss.refund_tx_id, cs.refund_tx_id) - WHERE -- Filter out refund txs from Payment tx list + WHERE -- Filter out refund txs from Send Swaps ptx.tx_id NOT IN (SELECT refund_tx_id FROM send_swaps WHERE refund_tx_id NOT NULL) + AND -- Filter out refund txs from Chain Swaps + ptx.tx_id NOT IN (SELECT refund_tx_id FROM chain_swaps WHERE refund_tx_id NOT NULL) AND {} ", where_clause.unwrap_or("true")