Skip to content

feat(money-account-balance-service): orchestrate balance source (rpc/…#9539

Draft
shane-t wants to merge 2 commits into
mainfrom
MUSD-1044-balance-source-orchestration
Draft

feat(money-account-balance-service): orchestrate balance source (rpc/…#9539
shane-t wants to merge 2 commits into
mainfrom
MUSD-1044-balance-source-orchestration

Conversation

@shane-t

@shane-t shane-t commented Jul 16, 2026

Copy link
Copy Markdown
Member

…api)

Turn MoneyAccountBalanceService into the single balance entry point. A new getBalance() method selects between the on-chain RPC Multicall strategy and a Money-API strategy (via MoneyAccountApiDataService:fetchPositions), with fallback, driven by the moneyAccountBalanceSource remote feature flag (enabledSources, preferredSource, maxAttempts) read the same way as the existing vault-config/stale-time flags. Scoped to balance values only so a Veda APY outage cannot block balances. getMoneyAccountBalance is retained for backwards compatibility.

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

…api)

Turn MoneyAccountBalanceService into the single balance entry point. A new
getBalance() method selects between the on-chain RPC Multicall strategy and a
Money-API strategy (via MoneyAccountApiDataService:fetchPositions), with
fallback, driven by the moneyAccountBalanceSource remote feature flag
(enabledSources, preferredSource, maxAttempts) read the same way as the
existing vault-config/stale-time flags. Scoped to balance values only so a
Veda APY outage cannot block balances. getMoneyAccountBalance is retained for
backwards compatibility.
@socket-security

socket-security Bot commented Jul 16, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​metamask/​money-account-api-data-service@​0.0.0-use.localN/AN/AN/AN/AN/A

View full report

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