MetaMask / MetaMask/metamask-mobile
refactor: make storage-wrapper operations synchronous
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
What is this about?
Now that we use MMKV, device storage operations are synchronous.
Our storage-wrapper methods are async only to support E2E, causing the whole storage-wrapper class to be behind a promise based architecture.
We need to decouple E2E fallbacks from the storage-wrapper implementation to have properly typed mmkv operations.
Scenario
N/A
Design
N/A
Technical Details
PR feat: Enable feature Flag Values with Scope Based on "threshold" in mobile has a draft commit on how it expects storage-wrapper interface to be.
Threat Modeling Framework
N/A
Acceptance Criteria
storage-wrapper methods to be sync when not running on E2E mode
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)
References
Epic: https://github.com/MetaMask/metamask-mobile/issues/10784
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the storage-wrapper implementation and the draft commit f43d4e848843572f1c08b8f7aa29d15dab0d924e referenced in the issue. Trace how E2E fallbacks are connected, then verify that storage-wrapper methods are synchronous outside E2E mode and that the required automation tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev, testing-qa
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100