fix(ui): show real data and consistent values across tabs
- Market chart now plots the real accumulated price_history instead of a rand()-generated curve; the hover tooltip no longer claims a specific "Xh ago" price and the x-axis only labels the truthful "Now" point. Falls back to the existing empty state until there are >=2 real samples. - Transactions summary cards exclude autoshield legs (same txid send + receive-to-z) so a shield isn't double-counted into both Sent and Received, matching the list. - Send/Receive sync banners use verification_progress like every other surface, instead of the blocks/headers ratio that over-reports during early sync. - Fix printf format/type mismatches: %.0f<-int (market % shielded), %d<-size_t (peer counts), %ld<-int64_t (peer byte counters, wrong on Windows). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -106,8 +106,11 @@ static void TrackNewAddresses(const WalletState& state) {
|
||||
static void RenderSyncBanner(const WalletState& state) {
|
||||
if (!state.sync.syncing || state.sync.isSynced()) return;
|
||||
|
||||
float syncPct = (state.sync.headers > 0)
|
||||
? (float)state.sync.blocks / state.sync.headers * 100.0f : 0.0f;
|
||||
// Use the work-weighted verification_progress like every other surface (not the naive
|
||||
// blocks/headers ratio, which over-reports during early sync).
|
||||
double vp = state.sync.verification_progress;
|
||||
if (vp < 0.0) vp = 0.0; else if (vp > 1.0) vp = 1.0;
|
||||
float syncPct = (float)(vp * 100.0);
|
||||
char syncBuf[128];
|
||||
snprintf(syncBuf, sizeof(syncBuf),
|
||||
TR("blockchain_syncing"), syncPct);
|
||||
|
||||
Reference in New Issue
Block a user