Remove client code for deprecated V1 /user-notification and /feature-flags (useSorobanPublic)

Open
#2,886 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
64/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Quiet
Tech stack
typescript

Research direction

Start with the listed account helpers, loadBackendSettings/saveSettings handlers, and popup settings state to trace both deprecated paths. Update the named Account, asset-visibility, and asset-selection consumers, then run the referenced Account tests and e2e stubs. Done means no V1 endpoint or Soroban flag references remain, the selector uses isRpcHealthy, and V2 flags and MaintenanceBanner are unchanged.

Written by the indexing model from the issue text.

Description

backend-migration

Client-side follow-up to stellar/freighter-backend-v2#122 (V1 endpoint deprecation, part of the V1 decommission).

The backend team is dropping two V1-only endpoints that were never ported to V2. Both are consumed exclusively by this extension, so we need to remove the related client code. Neither feature is lost — /user-notification is superseded by the Amplitude-driven MaintenanceBanner, and useSorobanPublic has been hardcoded true on the backend for its entire life.

⚠️ Sequencing (must ship before/with the V1 removal)

The /feature-flags fetch falls back to { useSorobanPublic: false } on failure. On mainnet that flips isSorobanPublicEnabled false and fires a false "Soroban is temporarily experiencing issues" toast to all mainnet users. So this client change must land before or simultaneously with the V1 endpoint removal. (/user-notification falls back to {enabled:false} and is harmless if removed first, but we should clean it up regardless.)

⚠️ Do NOT confuse three "feature-flags" systems

  1. V1 backend /feature-flags → useSorobanPublic — this is the only one being removed.
  2. V2 backend /feature-flags → swap_enabled/discover_enabled/onramp_enabled — different endpoint, actively used, leave alone.
  3. Amplitude fetchFeatureFlags in remoteConfig.ts → maintenance_banner — unrelated, leave alone.

Scope — remove /user-notification

  • extension/src/background/helpers/account.ts:344-356 — getUserNotification() fetch
  • extension/src/background/messageListener/handlers/loadBackendSettings.ts — stop returning userNotification
  • extension/src/popup/ducks/settings.ts — initialState.userNotification (:87), saveBackendSettings writes (:412, :418)
  • extension/src/popup/views/Account/index.tsx:255-266 — the <Notification> render block (the only render site) + selector read at :59
  • @shared/api/internal.ts — loadBackendSettings() return shape (:1914-1923), UserNotification import (:63)
  • @shared/api/types/types.ts — UserNotification interface (:213-216) + userNotification fields (:75, :222)
  • e2e stubs / test mocks: extension/e2e-tests/helpers/stubs.ts:41-46,2952, Account.test.tsx:358,400 (testid account-view-user-notification), and other *.test.tsx supplying userNotification

Scope — remove useSorobanPublic / V1 /feature-flags

  • extension/src/background/helpers/account.ts:358-370 — getFeatureFlags() fetch
  • extension/src/background/messageListener/handlers/loadBackendSettings.ts and saveSettings.ts — drop isSorobanPublicEnabled: featureFlags.useSorobanPublic mapping (two consumers)
  • extension/src/popup/ducks/settings.ts — initialState.isSorobanPublicEnabled (:85), debug reset (:158), reducer writes (:412-416, :446-468), and simplify settingsSorobanSupportedSelector (:663-669) to just isRpcHealthy
  • UI consumers via that selector (no behavior change intended, verify each): Account/index.tsx:58,92-102 (Soroban toast), manageAssets/AssetVisibility/index.tsx:33,111 (--short class), manageAssets/ChooseAsset/index.tsx:34,139 (--short class)
  • @shared/api/types/types.ts:73,220,232 and @shared/api/internal.ts:1672,1915 — isSorobanPublicEnabled type/default

Done when

  • No client references to /user-notification or the V1 /feature-flags endpoint / useSorobanPublic / isSorobanPublicEnabled remain.
  • settingsSorobanSupportedSelector returns isRpcHealthy on all networks; no mainnet regression (no spurious Soroban toast).
  • V2 /feature-flags (swap/discover/onramp) and the Amplitude maintenance_banner path are untouched.
  • Tests/e2e stubs updated; MaintenanceBanner remains the notification surface.

Refs: stellar/freighter-backend-v2#122

Dominant language
TypeScript
Stars
122
Forks
62
Avg merge
4d 19h
Merged PRs (30d)
41

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from stellar/freighter

All issues in stellar/freighter

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.