Skip to content

fix(wallet): align pending balance with Core unconfirmed (#1) - #2

Open
xre217 wants to merge 1 commit into
dogecoinfoundation:mainfrom
xre217:fix/pending-balance-rpc
Open

fix(wallet): align pending balance with Core unconfirmed (#1)#2
xre217 wants to merge 1 commit into
dogecoinfoundation:mainfrom
xre217:fix/pending-balance-rpc

Conversation

@xre217

@xre217 xre217 commented Jul 11, 2026

Copy link
Copy Markdown

#1 — Pending balance incorrect vs Core wallet

Cause

GET /api/wallet/balance computed pending as:
getbalance('*', 0) - getbalance('*', 1)

That account/minconf combination does not reliably match what operators see in Core for unconfirmed credit, and float subtract can drift.

Fix

  • Confirmed: getbalance('*', 1) (fallback getbalance())
  • Pending: getunconfirmedbalance() (fallback: listunspent minconf 0 vs 1)
  • Total: confirmed + pending, rounded to 8 decimals (koinu)

DOGE tips / contract

DTRJECKXfxgnSzGbt7TYRikLPDocqvdmo5 · trefongwork@gmail.com

…ation#1)

Previous available-vs-total subtract on getbalance('*', minconf) drifted
from Core wallet UI. Use confirmed getbalance + getunconfirmedbalance,
with listunspent fallback, and round to 8 decimals.

Tips DOGE: DTRJECKXfxgnSzGbt7TYRikLPDocqvdmo5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant