Skip to content

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

Description

@piyalbasu

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-flagsuseSorobanPublicthis is the only one being removed.
  2. V2 backend /feature-flagsswap_enabled/discover_enabled/onramp_enabled — different endpoint, actively used, leave alone.
  3. Amplitude fetchFeatureFlags in remoteConfig.tsmaintenance_banner — unrelated, leave alone.

Scope — remove /user-notification

  • extension/src/background/helpers/account.ts:344-356getUserNotification() fetch
  • extension/src/background/messageListener/handlers/loadBackendSettings.ts — stop returning userNotification
  • extension/src/popup/ducks/settings.tsinitialState.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.tsloadBackendSettings() return shape (:1914-1923), UserNotification import (:63)
  • @shared/api/types/types.tsUserNotification 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-370getFeatureFlags() fetch
  • extension/src/background/messageListener/handlers/loadBackendSettings.ts and saveSettings.ts — drop isSorobanPublicEnabled: featureFlags.useSorobanPublic mapping (two consumers)
  • extension/src/popup/ducks/settings.tsinitialState.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,1915isSorobanPublicEnabled 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions