mirror of
https://github.com/zhigang1992/wallet.git
synced 2026-04-28 20:55:30 +08:00
fix: don't subtract balances being returned to sender
This commit is contained in:
@@ -24,6 +24,7 @@ export function useBitcoinPendingTransactionsBalance(address: string) {
|
|||||||
sumNumbers(
|
sumNumbers(
|
||||||
pendingTransactions
|
pendingTransactions
|
||||||
.flatMap(tx => tx.vout.filter(output => output.scriptpubkey_address === address))
|
.flatMap(tx => tx.vout.filter(output => output.scriptpubkey_address === address))
|
||||||
|
.filter(tx => tx.scriptpubkey_address !== address)
|
||||||
.map(vout => vout.value)
|
.map(vout => vout.value)
|
||||||
),
|
),
|
||||||
'BTC'
|
'BTC'
|
||||||
|
|||||||
Reference in New Issue
Block a user