breez / breez-sdk-liquid

MIT License
24 stars 7 forks source link

[Testnet] Refund for failed Send LN swap doesn't complete #515

Open ok300 opened 1 month ago

ok300 commented 1 month ago

If a Send LN swap fails (for example, because we lockup less than the expected amount), the corresponding payment gets stuck in RefundPending.

The actual refund fails because no utxos are found for the swap lockup script. However, the utxo exists and is confirmed as seen by a blockchain explorer.

This is only an issue on testnet, where the lockup script history is queried using the electrum client.

On mainnet, where we use the Esplora API to fetch the lockup script history, this works correctly. The funds are refunded and the payment moves to Failed state, as expected.

roeierez commented 1 month ago

@ok300 I don't understand why no utxo are found even though there is a confirmed one. Can you please elaborate?