FIX: Lightning balance/fees don't add up (closes #225)

This commit is contained in:
Overtorment 2019-01-09 13:31:34 +00:00
parent cb5b77e683
commit 3301380e83

View file

@ -338,7 +338,7 @@ export class LightningCustodianWallet extends LegacyWallet {
if (tx.type === 'paid_invoice') {
tx.memo = tx.memo || 'Lightning payment';
if (tx.value > 0) tx.value = (tx.value * 1 + tx.fee * 1) * -1;
if (tx.value > 0) tx.value = tx.value * -1; // value already includes fee in it (see lndhub)
// outer code expects spending transactions to of negative value
}