Hide unsuccessful outgoing lndhub txs in list #132

Merged
raucao merged 1 commits from bugfix/lndhub_tx_list into master 2023-06-06 15:43:39 +00:00

View File

@ -86,6 +86,10 @@ class Services::LightningController < ApplicationController
end
end
# Handle an edge case where lndhub.go includes a failed payment in the
# list, which wasn't actually booked
txs.reject!{ |tx| tx["type"] == "paid_invoice" && tx["payment_preimage"].blank? }
txs.sort{ |a,b| b["datetime"] <=> a["datetime"] }
end
end