From c582d26e4587cd5c4dfff9521a67c00f56b4a8c1 Mon Sep 17 00:00:00 2001 From: Matej Kriz Date: Wed, 5 Feb 2025 12:39:07 +0100 Subject: [PATCH] feat(suite-native): report to sentry if user clear the app storage because of app storage error --- suite-native/storage/src/storage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suite-native/storage/src/storage.ts b/suite-native/storage/src/storage.ts index 8240ecffe3b..6b153376c24 100644 --- a/suite-native/storage/src/storage.ts +++ b/suite-native/storage/src/storage.ts @@ -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'; @@ -48,6 +48,7 @@ const retrieveStorageEncryptionKey = async () => { }; export const clearStorage = () => { + captureMessage('User triggered Clear App Storage action.', 'error'); unecryptedJotaiStorage.clearAll(); encryptedStorage?.clearAll(); RNRestart.restart();