From 096b6feed3c93159b56c80236ccd31ab5a324108 Mon Sep 17 00:00:00 2001 From: moralpriest Date: Thu, 9 Jul 2026 02:49:36 -0600 Subject: [PATCH] fix(walletapi): override wallet height with daemon tip for accurate sync indicator The daemon GetEncryptedBalance response contains both Height (stable, ~8 blocks behind tip) and DHeight (actual tip). The wallet stored Height as wallet height but compared against DHeight, causing a permanent gap that prevented sync indicators from turning green. Override stored Height/Topoheight with daemon tip values before saving. --- walletapi/daemon_communication.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/walletapi/daemon_communication.go b/walletapi/daemon_communication.go index 2cffea05..ef5dc142 100644 --- a/walletapi/daemon_communication.go +++ b/walletapi/daemon_communication.go @@ -470,7 +470,9 @@ func (w *Wallet_Memory) GetEncryptedBalanceAtTopoHeight(scid crypto.Hash, topohe } if topoheight == -1 && accountaddr == w.GetAddress().String() { - //fmt.Printf("topoheight %d accountaddr '%s' waddress '%s'\n ",topoheight,accountaddr,w.GetAddress().String()) + // Override Height/Topoheight with daemon tip so sync indicator is accurate. + result.Height = result.DHeight + result.Topoheight = result.DTopoheight w.setEncryptedBalanceresult(scid, result) w.account.TopoHeight = result.Topoheight