Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update list payments to include chain swaps with only user lockup #620

Open
wants to merge 2 commits into
base: rt-sync
Choose a base branch
from

Conversation

dangeross
Copy link
Collaborator

@dangeross dangeross commented Dec 19, 2024

This PR allows a payment event to be emitted without a tx_id and updates the payments query to:

  • do a FULL JOIN with the chain_swaps table (include chain swaps without claim txs) filtering out where the swap state is Created or TimedOut
  • filter out receive_swaps where the swap state is Created, Failed or TimedOut

Fixes breez/misty-breez#276

{
    "destination": null,
    "tx_id": null,
    "timestamp": 1734626434,
    "amount_sat": 47796,
    "fees_sat": 2204,
    "swapper_fees_sat": 50,
    "payment_type": "Receive",
    "status": "Pending",
    "details": {
         "Bitcoin": {
             "swap_id": "tYJ9vuAa828n",
             "description": "Bitcoin transfer",
             "refund_tx_id": null,
             "refund_tx_amount_sat": null
         }
    }
}

@dangeross dangeross force-pushed the savage-receive-chain-pending branch from ba8e0ac to d572465 Compare December 19, 2024 18:40
@dangeross dangeross changed the base branch from main to rt-sync December 19, 2024 18:40
Copy link
Contributor

@danielgranhao danielgranhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Receiving onchain pending transaction is not shown
3 participants