Skip to content

Conversation

@juanmigdr
Copy link
Member

@juanmigdr juanmigdr commented Nov 7, 2025

Explanation

Balance is set to 0 when importing non-evm asset because assetsWithoutBalance.delete(assetId); is run conditionally when it shouldnt

References

https://consensyssoftware.atlassian.net/browse/ASSETS-1425

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, highlighting breaking changes as necessary
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

Note

Fixes balance merge in MultichainBalancesController so importing a non‑EVM asset doesn’t reset its positive balance to 0; updates changelog.

  • Balances:
    • Correct balance merge in src/MultichainBalancesController/MultichainBalancesController.ts by iterating with Object.keys(accountBalances) and unconditionally removing processed assets from assetsWithoutBalance.
      • Prevents imported non‑EVM assets with existing positive balances from being overwitten with 0.
  • Docs:
    • Update CHANGELOG.md under UnreleasedFixed to note the non‑EVM import balance issue.

Written by Cursor Bugbot for commit 0d90813. This will update automatically on new commits. Configure here.

@juanmigdr juanmigdr marked this pull request as ready for review November 7, 2025 18:40
@juanmigdr juanmigdr requested review from a team as code owners November 7, 2025 18:40
@juanmigdr juanmigdr enabled auto-merge (squash) November 7, 2025 18:41
@juanmigdr juanmigdr merged commit 6175608 into main Nov 7, 2025
273 checks passed
@juanmigdr juanmigdr deleted the fix/balance-set-to-0 branch November 7, 2025 18:44
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.

4 participants