minibits-cash / minibits_wallet

MIT License
74 stars 7 forks source link

Pay LN invoice - mint error - payment failed #76

Closed JuanOfTheNorth closed 5 months ago

JuanOfTheNorth commented 6 months ago

Shows as PENDING in tx list (since May 17) but Audit trail below shows mint error payment failed.

[{"status":"DRAFT","mintBalanceToTransferFrom":{"mintUrl":"https://mint.minibits.cash/Bitcoin","balances":{"sat":4202}},"amountToTransfer":2000,"unit":"sat","meltQuote":{"quote":"ouGtxYqcn3uMG55gttoRjXfOFuKEQimmSZ0NM27T","amount":2000,"fee_reserve":20,"paid":false,"expiry":1716022508},"encodedInvoice":"lnbc20u1pny03pvsp5lf63stal8wjhclurmhu2jq3zf06zpn9c0mcq4fatftf2ha7n4smqpp5mnfr2clth3kht8lt0kxphgsknh2ptuf70zn34fh76squg3g3n8yqdpz2djkuepqw3hjqnpdgf2yxgrpv3j8yetnwvxqyp2xqcqz95rzjq2xe65l5kr28kqjgmp5luxvmcc7tdstx26qksyywk4ahn0nraunrczzxeyqq28qqqqqqqqqqqqqqq9gq2y9qxpqysgq3dzje874pazjyahc0wa0c0wzfgesqvf8qp7h85v3dqs8pgp0vqvk7877xjuuwnq5zg8hsgc69zlh4sg04zgn675d6kwd5js6laz8fggqzjah3a","createdAt":"2024-05-17T20:56:25.843Z"},{"status":"PREPARED","createdAt":"2024-05-17T20:56:31.241Z"},{"status":"PENDING","error":{"name":"MINT_ERROR","message":"Lightning payment failed.","params":{"message":"[object Object]","caller":"payLightningMelt","mintUrl":"https://mint.minibits.cash/Bitcoin"}},"amountToMove":2020,"amountPendingByMint":2020,"createdAt":"2024-05-17T20:57:33.469Z"}]

minibits-cash commented 5 months ago

In this case the lightning payment did neither complete nor fails in the 1 min time limit - it happens if e.g. the receiving node holds the settlement of the invoice (so called hodl invoices) and the lightning payment remains in-flight. In that case, both mint and Minibits wallet keeps the proofs sent to the mint to settle the invoice as pending until the payment settles or fails on lightning node. This can take up to multiple hours. When the mint finally clears the payment from pending without completing the payment, wallet returns such funds back to spendable and transaction status changes to ERROR. If that did not happen, try restarting the wallet - I've checked the mint and the payment did not go through.

JuanOfTheNorth commented 5 months ago

The funds still hadn't come back but I just un-installed and then recovered from seed and the funds are visible now.

Thank you