FIX: Lightning spending transactions should have negative amount

This commit is contained in:
Overtorment 2018-12-28 23:36:47 +00:00
parent 055b72e95b
commit 205bbd5b1b

View File

@ -338,6 +338,8 @@ 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;
// outer code expects spending transactions to of negative value
}
if (tx.type === 'bitcoind_tx') {