Skip to content

Fix/assets 3856 stale balance polling chris - #10029

Draft
Kriys94 wants to merge 2 commits into
mainfrom
fix/ASSETS-3856-stale-balance-polling-chris
Draft

Fix/assets 3856 stale balance polling chris#10029
Kriys94 wants to merge 2 commits into
mainfrom
fix/ASSETS-3856-stale-balance-polling-chris

Conversation

@Kriys94

@Kriys94 Kriys94 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

stevenkeith-consensys and others added 2 commits August 25, 2026 11:09
…ASSETS-3856)

The Accounts API reports a zero balance by omission: a token the account
no longer holds is absent from balance responses rather than returned as
"0". Subscription poll responses are applied with updateMode 'merge' —
an object spread that can only add or overwrite keys — so an omitted
token keeps its last non-zero balance through every poll cycle until app
restart.

Adds a repro driving the real subscription pipeline (unlock, startup
fetch, AccountsApiDataSource poll) against a mocked Accounts API client,
mirroring the reported scenario: a Linea account max-swaps USDC to USDT
and the API omits USDC from subsequent polls.

NOTE: the first test asserts the DESIRED behavior and intentionally
FAILS on current code (expected "0", received "100"); it becomes the
regression test once a fix lands. The second test (explicit zero through
the same pipeline) passes, isolating the defect to omission handling.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
abretonc7s added a commit that referenced this pull request Sep 1, 2026
The entry cited #10029, a number guessed before the PR existed. CI's
changelog check requires the entry to link the PR that introduces the
change, which is #10037, and failed with "There are changes made to
this package that may not be reflected in the changelog".

changelog:validate only checks formatting, so this passed locally while
the CI check did not.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants