Hide unsuccessful outgoing lndhub txs in list
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Release Drafter / Update release notes draft (pull_request) Successful in 4s

This commit is contained in:
Râu Cao 2023-06-05 13:06:49 +03:00
parent 7000908891
commit 259e72167b
Signed by: raucao
GPG Key ID: 15E65F399D084BA9

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