Skip to content

Alleviate storage limit issue (Internal Ticket) #2914

@mobularay

Description

@mobularay

Description

In the mobile application we are starting to see a Storage Limit Error becoming a more frequent reported issue. This requires the user to setup their wallet each time this error is thrown. The evidence seems to suggest that since we are saving the entire redux state for the app and decrypting it upon login it opens up the potential for data corruption causing the error.

Focus:

  1. Store the opt-in to metrics in a different location to allow this issue to be logged.
  2. Limit the amount of user generated data that can be stored (e.g. Txs, NFTs). The extension only stores the latest 100 Txs across all accounts.

Technical Requirements

  • Pull at least the analytics field from redux persist into it's own key so that it's not nested under the root key. Hint: Look at the analytics reducer, that's where analytics is being set. This addresses focus number one.
  • Regarding limiting TXs, limit/truncate the incoming TXs count to 40. This addresses focus number two.
  • Will most likely need to update analytics reducer.
  • May have to update tests related to redux
  • Add to controller addTransaction() see extension reference

Acceptance Criteria

  • Ensure that the analytics field that controls MetaMetrics is stored outside of the root key in redux-persist.
  • Somehow emulate the corrupt storage scenario and verify that events are still being tracked
  • Ensure that the max number of TXs cached is 40.
  • Still be able to view transactions on different accounts

References

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions