MetaMask / MetaMask/metamask-mobile
(mob) Ledger with Android devices that have declined permissions- Settings helper improvement
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
**What is this about?**
When a user has previously failed to grant Location or Nearby device permissions, enhance the settings helper to take the user 2 menus deeper to clicks and take the user directly to where the need to make changes.
This is a continuation of an earlier bug [report](https://github.com/MetaMask/metamask-mobile/issues/4920)
On both Android 11 and 14, the settings helper directs users to the app settings (Settings>Apps>MetaMask) instead of directly to Settings>Apps>MetaMask>Permissions>Location for older devices or Settings>Apps>MetaMask>Permissions>Nearby devices for newer ones.
Recording:
[Android 11](https://www.loom.com/share/5bdea042cc914c0e8c811a72e2c7d126?sid=9f3607a1-e7e1-4782-befb-edd2215f3761)
**Scenario**
Reproduction steps
1. Ensure that Bluetooth device connection has been forgotten in the mobile OS settings
2. Get a fresh install of MMM
3. Configure MMM by importing an SRP
6. From wallet view tap the account icon and follow the add hardware flow for Ledger
7. When Location/Nearby device permissions are requested, decline/reject
8. Reject Permissions a second time when asked again
9. Notice error
10. Tap CTA "View Settings"
11. Note that user is brought to app level settings rather than into the Permissions Menu and the Permission in question (which depends on the API level of the device)
GIVEN a user has Bluetooth turned on
WHEN a user declines the Location/Nearby devices permissions prompt
AND a user attempts to pair a Ledger
THEN an error should be presented
AND the user should be helped into the menu directly to enable the permission required
**Acceptance Criteria**
When Bluetooth is turned on, but MMM does not have Location/Nearby Device permissions. The error message and helper button should bring the user to permission in question for the app, right now there are still 2 layers further the user must know to click thru.
**Stakeholder review needed before the work gets merged**
- [ ] Engineering (needed in most cases)
- [ ] Design
- [ ] Product
- [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
- [ ] Security
- [ ] Legal
- [ ] Marketing
- [ ] Management (please specify)
- [ ] Other (please specify)
Contributor guide
Research direction
Start by locating the settings helper used by the Ledger pairing flow and the error path after Location or Nearby devices permission is declined. Reproduce the flow on Android 11 and 14, then verify that the View Settings action opens the relevant MetaMask permission screen and that the required automated tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100