Skip to content
Permalink
Browse files

Correctly count unconfirmed txs in api GetXpub

  • Loading branch information...
martinboehm committed Mar 6, 2019
1 parent e06ff19 commit efca04a3fbd5bcf2600eaa3931e7608a58b597fd
Showing with 3 additions and 1 deletion.
  1. +3 −1 api/xpub.go
@@ -427,7 +427,9 @@ func (w *Worker) GetXpubAddress(xpub string, page int, txsOnPage int, option Acc
}
// skip already confirmed txs, mempool may be out of sync
if tx.Confirmations == 0 {
unconfirmedTxs++
if !foundTx {
unconfirmedTxs++
}
uBalSat.Add(&uBalSat, tx.getAddrVoutValue(ad.addrDesc))
uBalSat.Sub(&uBalSat, tx.getAddrVinValue(ad.addrDesc))
if page == 0 && !foundTx && (useTxids == nil || useTxids(&txid, ad)) {

0 comments on commit efca04a

Please sign in to comment.
You can’t perform that action at this time.