MetaMask / MetaMask/metamask-mobile
[Bug]: "Don't remind me again" checkbox saves preference immediately on click, even if user cancels
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
## Describe the bug
The "Don't remind me again" checkbox in the deep link modal saves the preference (`deepLinkModalDisabled`) immediately when clicked, even if the user then clicks Cancel/Back. This causes future private links to skip the modal unintentionally.
## Expected behavior
The preference should only be saved when the user checks the checkbox **AND** clicks Continue. If the user clicks Cancel, the preference should not be saved.
## Steps to reproduce
1. Open a private (signed) deep link that shows the deep link modal
2. Check the "Don't remind me again" checkbox
3. Click Cancel/Back (close button)
4. Open another private deep link
5. Observe that the modal is skipped (preference was saved despite canceling)
## Error messages or log output
No errors. Incorrect behavior only.
## Where was this bug found?
- [x] Live version (from official store)
- [ ] Internal release testing
## Version
7.61.5
## Build number
3341
## Build type
- [ ] Beta
- [ ] Flask
- [ ] Other (please specify exactly where you obtained this build in "Additional Context" section)
## Device
Any device (iOS/Android)
## Operating system
- [x] iOS
- [x] Android
## Additional context
**Current Implementation:** `onDontRemindMeAgainPressed` in `app/components/UI/DeepLinkModal/DeepLinkModal.tsx` immediately dispatches `setDeepLinkModalDisabled` when checkbox is clicked.
**Proposed Fix:**
- Checkbox click should only update local state (`isChecked`)
- Continue button should check `isChecked` and save preference only when Continue is pressed
- Cancel should never save preference
**Files to modify:**
- `app/components/UI/DeepLinkModal/DeepLinkModal.tsx`
- `app/components/UI/DeepLinkModal/DeepLinkModal.test.tsx`
**Additional Fix Needed:** There is currently **no settings UI** to change this preference back once saved. Users would need to clear app data or reinstall to reset it. Consider adding a settings toggle in Security/Privacy settings to allow users to re-enable the modal.
**Storage:** The preference is stored in Redux state (`app/reducers/settings/index.js`) as `deepLinkModalDisabled`. It persists across app sessions but cannot be changed via Settings screens.
**Impact:** Medium - Users may accidentally save preferences and cannot easily undo it. Fix is low-risk (move dispatch from checkbox handler to Continue handler).
## Severity
To be added after bug submission by internal support / PM:
- How critical is the impact of this bug on a user?
- Add stats if available on % of customers impacted
- Is this visible to all users?
- Is this tech debt?
Contributor guide
Research direction
Start with onDontRemindMeAgainPressed in app/components/UI/DeepLinkModal/DeepLinkModal.tsx and inspect the related Continue and Cancel handlers. Run app/components/UI/DeepLinkModal/DeepLinkModal.test.tsx, then add coverage for checking the box and canceling versus continuing. Done means Cancel leaves deepLinkModalDisabled unchanged while Continue saves the checked preference.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, redux, typescript
- Domain
- frontend, mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 62/100