Skip to content

refactor: remove Zerion as a balances API provider#3202

Open
vseehausen wants to merge 7 commits into
mainfrom
wa-2753-remove-zerion-from-balances-endpoint
Open

refactor: remove Zerion as a balances API provider#3202
vseehausen wants to merge 7 commits into
mainfrom
wa-2753-remove-zerion-from-balances-endpoint

Conversation

@vseehausen

Copy link
Copy Markdown
Member

Summary

  • /portfolio now serves all Zerion data, so Zerion is no longer needed in the /balances (or /collectibles) endpoint.
  • The Zerion fallback for counterfactual safes and the Zerion collectibles path were dead code — Datadog shows zero production traffic to them. Counterfactual safes now return a 404 from /balances instead of Zerion data.
  • Deletes the unused ZerionBalancesApi service, its collectibles entity/builder, and the dead integration specs.
  • Kept: zerion-balance.entity, zerion-api.helpers, and the wallet-portfolio service, which /portfolio and /positions still use.

Related

🤖 Generated with Claude Code

The /portfolio endpoint now serves Zerion data. The Zerion fallback in
the balances endpoint (counterfactual safes) and the Zerion collectibles
path were dead code, confirmed unused in production. Counterfactual safes
now return a 404 from /balances instead of Zerion data.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vseehausen vseehausen requested a review from a team as a code owner June 29, 2026 10:48
@datadog-official

This comment has been minimized.

…afe check

Removing the Zerion balances provider also removed the transactionApi.isSafe(safeAddress) network call from BalancesApiManager.getApi (it only existed to branch deployed-vs-Zerion). The V1 /safes overview now makes 6 network calls instead of 7 — the duplicate GET /api/v1/safes/{address} is gone. Update the four affected assertions accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@LucieFaire

This comment was marked as resolved.

@claude

This comment was marked as resolved.

@LucieFaire

This comment was marked as resolved.

@vseehausen

This comment was marked as resolved.

@vseehausen

This comment was marked as resolved.

@claude

This comment was marked as resolved.

vseehausen and others added 2 commits July 9, 2026 14:54
- Drop the now-dead `safeAddress` param from `IBalancesApiManager.getApi`
  and every call site; remove the fake addresses generated only to satisfy it
- Remove the dead `features.counterfactualBalances` flag (env var,
  .env.sample.json, .vscode/launch.json, config default, and the spec overrides)
- Drop the redundant `rawify` in `getFiatCodes` (already returns `Raw<>`)
- Add an integration test asserting a counterfactual Safe → 404 from /balances
- Rename the `getApi checks` describe block to `SafeBalancesApi routing`

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-from-balances-endpoint

# Conflicts:
#	src/config/entities/__tests__/configuration.ts
#	src/config/entities/configuration.ts
@vseehausen

This comment was marked as resolved.

@claude

This comment was marked as resolved.

…ppers

Remove the lingering FF_COUNTERFACTUAL_BALANCES export from the devcontainer
compose file and collapse the now-empty testConfiguration wrappers in the
balances/collectibles integration specs to pass the base configuration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vseehausen

This comment was marked as resolved.

@claude

This comment was marked as resolved.

The features override was only carrying counterfactualBalances, which was
removed; the wrapper still sets mappings.safe.maxOverviews.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vseehausen

This comment was marked as resolved.

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.

2 participants