Skip to content

Commit

Permalink
feat(suite-native): report to sentry if user clear the app storage be…
Browse files Browse the repository at this point in the history
…cause of app storage error
  • Loading branch information
matejkriz committed Feb 5, 2025
1 parent defcccb commit c582d26
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion suite-native/storage/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Alert } from 'react-native';
import { MMKV } from 'react-native-mmkv';
import RNRestart from 'react-native-restart';

import { captureException } from '@sentry/react-native';
import { captureException, captureMessage } from '@sentry/react-native';
import { getRandomBytes } from 'expo-crypto';
import * as SecureStore from 'expo-secure-store';
import * as SplashScreen from 'expo-splash-screen';
Expand Down Expand Up @@ -48,6 +48,7 @@ const retrieveStorageEncryptionKey = async () => {
};

export const clearStorage = () => {
captureMessage('User triggered Clear App Storage action.', 'error');
unecryptedJotaiStorage.clearAll();
encryptedStorage?.clearAll();
RNRestart.restart();
Expand Down

0 comments on commit c582d26

Please sign in to comment.