Skip to content

Commit

Permalink
Update list-payments: exclude chain swap refunds (#366)
Browse files Browse the repository at this point in the history
If not excluded, they appear as separate Receive payments.
  • Loading branch information
ok300 authored Jul 8, 2024
1 parent 015fb1f commit 4cd5b96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/core/src/persist/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 4cd5b96

Please sign in to comment.