Skip to content

fix balance address/total sync#3408

Merged
smk762 merged 1 commit intodevfrom
fix-sia-balance-lag
Nov 24, 2025
Merged

fix balance address/total sync#3408
smk762 merged 1 commit intodevfrom
fix-sia-balance-lag

Conversation

@smk762
Copy link
Copy Markdown
Collaborator

@smk762 smk762 commented Nov 24, 2025

Summary

  • Fixes CoinsBloc refresh path so non-streaming assets (e.g., Sia) update portfolio totals using the correct asset-id keys and so repo-level polling broadcasts balance changes through the same stream as real-time coins.
  • Adds an SDK-level watchPubkeys hint pipeline: non-streaming assets now register a pubkey listener inside BalanceManager, and whenever a pubkey update shows a balance delta we immediately hydrate lastKnown via getBalance() and emit the refreshed BalanceInfo.
  • Introduces a per-coin “burst refresh” that runs only after a detected change. The fast path fetches a fresh balance right away and then automatically reverts to the normal 30 s polling cadence, keeping resource usage flat.
  • Removes the ad-hoc GUI workaround so that every client benefitting from the SDK inherits the improved latency without additional code.

Testing

  • Desktop/web manual receive test for Sia: confirmed address list updates immediately, and portfolio + coin totals now follow within a few seconds without navigation or tab refocus.
  • Regression smoke on a streaming asset (BTC) to ensure the balance stream is unaffected and the stale guard still uses the default cadence.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 24, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-sia-balance-lag

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@smk762 smk762 merged commit 368fcc5 into dev Nov 24, 2025
6 of 12 checks passed
@github-actions
Copy link
Copy Markdown

Visit the preview URL for this PR (updated for commit d1d928b):

https://walletrc--pull-3408-merge-2n4j2mpp.web.app

(expires Mon, 01 Dec 2025 07:46:42 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: f66a4ff03faa546f12f0ae5a841bd9eff2714dcc

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