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.
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.