Skip to content

feat: AUS Perps Watchlist#9010

Draft
gambinish wants to merge 4 commits into
mainfrom
perps/tat-2663-migrate-perps-watchlist-to-aus
Draft

feat: AUS Perps Watchlist#9010
gambinish wants to merge 4 commits into
mainfrom
perps/tat-2663-migrate-perps-watchlist-to-aus

Conversation

@gambinish

@gambinish gambinish commented Jun 4, 2026

Copy link
Copy Markdown
Member

Explanation

Persists state.watchlistMarkets to AUS so the watchlist follows the user across devices and clients, rather than being device-local only.

What changed

  • toggleWatchlistMarket now performs an optimistic local update first (UI is instant), then syncs to AUS. If the remote write fails, local state is reverted.
  • On init(), the controller hydrates state.watchlistMarkets from AUS. AUS is the source of truth; local state acts as an offline cache (persist: true unchanged).
  • One-time migration: if a user already has local markets saved but no AUS record yet, those are pushed up automatically on first init.
  • Falls back to local-only silently when unauthenticated or when the active provider has no AUS mapping (e.g. aggregated).
  • Adds resolveWatchlistExchangeKey() — the single extension point for adding future DEX providers to AUS sync.
    Integration (client PRs)

Each client needs to grant the PerpsController messenger two new allowed actions:

  • AuthenticatedUserStorageService:getNotificationPreferences
  • AuthenticatedUserStorageService:putNotificationPreferences

No other wiring needed — AuthenticatedUserStorageService is already running wherever NotificationServicesController is wired, and AuthenticationController:getBearerToken was already allowed.

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

@gambinish gambinish changed the title feat: aus watchlist init feat: AUS Perps Watchlist Jun 4, 2026
Comment thread packages/perps-controller/src/PerpsController.ts
@gambinish

Copy link
Copy Markdown
Member Author

@metamaskbot publish-previews

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Preview builds have been published. Learn how to use preview builds in other projects.

Expand for full list of packages and versions.
@metamask-previews/account-tree-controller@7.5.2-preview-7bc7196a6
@metamask-previews/accounts-controller@39.0.1-preview-7bc7196a6
@metamask-previews/address-book-controller@7.1.2-preview-7bc7196a6
@metamask-previews/ai-controllers@0.7.0-preview-7bc7196a6
@metamask-previews/analytics-controller@1.1.1-preview-7bc7196a6
@metamask-previews/analytics-data-regulation-controller@0.0.0-preview-7bc7196a6
@metamask-previews/announcement-controller@8.1.0-preview-7bc7196a6
@metamask-previews/app-metadata-controller@2.0.1-preview-7bc7196a6
@metamask-previews/approval-controller@9.0.2-preview-7bc7196a6
@metamask-previews/assets-controller@8.3.3-preview-7bc7196a6
@metamask-previews/assets-controllers@108.6.0-preview-7bc7196a6
@metamask-previews/authenticated-user-storage@2.0.0-preview-7bc7196a6
@metamask-previews/base-controller@9.1.0-preview-7bc7196a6
@metamask-previews/base-data-service@0.1.3-preview-7bc7196a6
@metamask-previews/bridge-controller@75.0.0-preview-7bc7196a6
@metamask-previews/bridge-status-controller@72.1.0-preview-7bc7196a6
@metamask-previews/build-utils@3.0.4-preview-7bc7196a6
@metamask-previews/chain-agnostic-permission@1.6.1-preview-7bc7196a6
@metamask-previews/chomp-api-service@3.1.0-preview-7bc7196a6
@metamask-previews/claims-controller@0.5.3-preview-7bc7196a6
@metamask-previews/client-controller@1.0.1-preview-7bc7196a6
@metamask-previews/compliance-controller@2.1.0-preview-7bc7196a6
@metamask-previews/composable-controller@12.0.1-preview-7bc7196a6
@metamask-previews/config-registry-controller@0.4.1-preview-7bc7196a6
@metamask-previews/connectivity-controller@0.2.0-preview-7bc7196a6
@metamask-previews/controller-utils@12.1.1-preview-7bc7196a6
@metamask-previews/core-backend@6.3.3-preview-7bc7196a6
@metamask-previews/delegation-controller@3.0.2-preview-7bc7196a6
@metamask-previews/earn-controller@12.2.0-preview-7bc7196a6
@metamask-previews/eip-5792-middleware@3.0.4-preview-7bc7196a6
@metamask-previews/eip-7702-internal-rpc-middleware@0.1.1-preview-7bc7196a6
@metamask-previews/eip1193-permission-middleware@2.0.1-preview-7bc7196a6
@metamask-previews/ens-controller@19.1.3-preview-7bc7196a6
@metamask-previews/eth-block-tracker@15.0.1-preview-7bc7196a6
@metamask-previews/eth-json-rpc-middleware@23.1.3-preview-7bc7196a6
@metamask-previews/eth-json-rpc-provider@6.0.1-preview-7bc7196a6
@metamask-previews/foundryup@1.0.1-preview-7bc7196a6
@metamask-previews/gas-fee-controller@26.2.2-preview-7bc7196a6
@metamask-previews/gator-permissions-controller@4.2.0-preview-7bc7196a6
@metamask-previews/geolocation-controller@0.1.3-preview-7bc7196a6
@metamask-previews/json-rpc-engine@10.5.0-preview-7bc7196a6
@metamask-previews/json-rpc-middleware-stream@8.0.8-preview-7bc7196a6
@metamask-previews/keyring-controller@27.0.0-preview-7bc7196a6
@metamask-previews/logging-controller@8.0.2-preview-7bc7196a6
@metamask-previews/message-manager@14.1.2-preview-7bc7196a6
@metamask-previews/messenger@1.2.0-preview-7bc7196a6
@metamask-previews/messenger-cli@0.2.0-preview-7bc7196a6
@metamask-previews/money-account-balance-service@1.0.2-preview-7bc7196a6
@metamask-previews/money-account-controller@0.3.3-preview-7bc7196a6
@metamask-previews/money-account-upgrade-controller@2.0.4-preview-7bc7196a6
@metamask-previews/multichain-account-service@10.0.3-preview-7bc7196a6
@metamask-previews/multichain-api-middleware@3.1.3-preview-7bc7196a6
@metamask-previews/multichain-network-controller@3.1.3-preview-7bc7196a6
@metamask-previews/multichain-transactions-controller@7.1.1-preview-7bc7196a6
@metamask-previews/name-controller@9.1.2-preview-7bc7196a6
@metamask-previews/network-controller@32.0.0-preview-7bc7196a6
@metamask-previews/network-enablement-controller@5.3.0-preview-7bc7196a6
@metamask-previews/notification-services-controller@24.1.3-preview-7bc7196a6
@metamask-previews/passkey-controller@2.0.1-preview-7bc7196a6
@metamask-previews/permission-controller@13.1.1-preview-7bc7196a6
@metamask-previews/permission-log-controller@5.1.0-preview-7bc7196a6
@metamask-previews/perps-controller@8.0.0-preview-7bc7196a6
@metamask-previews/phishing-controller@17.2.0-preview-7bc7196a6
@metamask-previews/polling-controller@16.0.6-preview-7bc7196a6
@metamask-previews/preferences-controller@23.1.0-preview-7bc7196a6
@metamask-previews/profile-metrics-controller@3.2.0-preview-7bc7196a6
@metamask-previews/profile-sync-controller@28.1.1-preview-7bc7196a6
@metamask-previews/ramps-controller@14.1.1-preview-7bc7196a6
@metamask-previews/rate-limit-controller@7.0.1-preview-7bc7196a6
@metamask-previews/react-data-query@0.2.1-preview-7bc7196a6
@metamask-previews/remote-feature-flag-controller@4.2.2-preview-7bc7196a6
@metamask-previews/sample-controllers@5.0.1-preview-7bc7196a6
@metamask-previews/seedless-onboarding-controller@10.0.2-preview-7bc7196a6
@metamask-previews/selected-network-controller@26.1.3-preview-7bc7196a6
@metamask-previews/shield-controller@5.1.2-preview-7bc7196a6
@metamask-previews/signature-controller@39.2.5-preview-7bc7196a6
@metamask-previews/snap-account-service@0.3.1-preview-7bc7196a6
@metamask-previews/social-controllers@2.2.1-preview-7bc7196a6
@metamask-previews/storage-service@1.0.2-preview-7bc7196a6
@metamask-previews/subscription-controller@6.1.3-preview-7bc7196a6
@metamask-previews/transaction-controller@67.1.0-preview-7bc7196a6
@metamask-previews/transaction-pay-controller@23.4.0-preview-7bc7196a6
@metamask-previews/user-operation-controller@41.2.4-preview-7bc7196a6
@metamask-previews/wallet@3.0.0-preview-7bc7196a6

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