Merge pull request 'Hide unsuccessful outgoing lndhub txs in list' (#132) from bugfix/lndhub_tx_list into master
All checks were successful
continuous-integration/drone/push Build is passing

Reviewed-on: #132
This commit is contained in:
Râu Cao 2023-06-06 15:43:38 +00:00
commit c0b1112e49

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