mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-20 02:09:10 +01:00
FIX: Lightning spending transactions should have negative amount
This commit is contained in:
parent
055b72e95b
commit
205bbd5b1b
@ -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') {
|
||||
|
Loading…
Reference in New Issue
Block a user