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
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #132
This commit is contained in:
commit
c0b1112e49
@ -86,6 +86,10 @@ class Services::LightningController < ApplicationController
|
|||||||
end
|
end
|
||||||
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"] }
|
txs.sort{ |a,b| b["datetime"] <=> a["datetime"] }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user