Skip to content

refactor: update notification services to use AUS preferences for feature announcements#8861

Merged
samir-acle merged 2 commits into
mainfrom
fix/marketing-notifications-use-AUS-preferences
May 20, 2026
Merged

refactor: update notification services to use AUS preferences for feature announcements#8861
samir-acle merged 2 commits into
mainfrom
fix/marketing-notifications-use-AUS-preferences

Conversation

@baptiste-marchand
Copy link
Copy Markdown
Contributor

@baptiste-marchand baptiste-marchand commented May 20, 2026

Explanation

Related PR discussion: MetaMask/metamask-mobile#30106 (comment)

References

Fixes: https://consensyssoftware.atlassian.net/browse/GE-244

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

Note

Medium Risk
Changes the gating logic for fetching feature-announcement notifications to rely on AUS marketing.inAppNotificationsEnabled, which could alter when users see announcements if preferences are missing or inconsistent. Scope is limited to notification fetching behavior and associated tests/changelog updates.

Overview
Feature announcement fetching in fetchAndUpdateMetamaskNotifications now depends on AUS notification preferences (marketing.inAppNotificationsEnabled) rather than the controller’s isFeatureAnnouncementsEnabled state, and it reuses a single preferences read for both announcements and on-chain notification address selection.

Tests were updated to mock AUS marketing preference and assert announcements are fetched/not fetched accordingly, and the changelog documents the switch away from the deprecated controller flag.

Reviewed by Cursor Bugbot for commit 3bb79b1. Bugbot is set up for automated code reviews on this repo. Configure here.

@baptiste-marchand baptiste-marchand changed the title Update notification services to use AUS preferences for feature announcements refactor: update notification services to use AUS preferences for feature announcements May 20, 2026
Copy link
Copy Markdown
Contributor

@samir-acle samir-acle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@samir-acle samir-acle added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 19f4d9b May 20, 2026
370 checks passed
@samir-acle samir-acle deleted the fix/marketing-notifications-use-AUS-preferences branch May 20, 2026 19:30
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