From 4cbc4fb980614d1aa9db7a08e2184f3d815d0f91 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 16:05:38 -0700 Subject: [PATCH 01/19] Bump Sentry, expo lib deps --- ios/Podfile.lock | 127 ++++++---- package.json | 4 +- yarn.lock | 622 +++++++++++++++++++++-------------------------- 3 files changed, 346 insertions(+), 407 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ec33afdb2c59..29837d40a0ef 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -14,16 +14,16 @@ PODS: - ExpoModulesCore - Expo (52.0.27): - ExpoModulesCore - - expo-dev-client (5.0.19): + - expo-dev-client (5.0.20): - EXManifests - expo-dev-launcher - expo-dev-menu - expo-dev-menu-interface - EXUpdatesInterface - - expo-dev-launcher (5.0.34): + - expo-dev-launcher (5.0.35): - DoubleConversion - EXManifests - - expo-dev-launcher/Main (= 5.0.34) + - expo-dev-launcher/Main (= 5.0.35) - expo-dev-menu - expo-dev-menu-interface - ExpoModulesCore @@ -49,7 +49,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-launcher/Main (5.0.34): + - expo-dev-launcher/Main (5.0.35): - DoubleConversion - EXManifests - expo-dev-launcher/Unsafe @@ -78,7 +78,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-launcher/Unsafe (5.0.34): + - expo-dev-launcher/Unsafe (5.0.35): - DoubleConversion - EXManifests - expo-dev-menu @@ -106,10 +106,10 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu (6.0.24): + - expo-dev-menu (6.0.25): - DoubleConversion - - expo-dev-menu/Main (= 6.0.24) - - expo-dev-menu/ReactNativeCompatibles (= 6.0.24) + - expo-dev-menu/Main (= 6.0.25) + - expo-dev-menu/ReactNativeCompatibles (= 6.0.25) - glog - RCT-Folly (= 2024.10.14.00) - RCTRequired @@ -130,7 +130,7 @@ PODS: - ReactCommon/turbomodule/core - Yoga - expo-dev-menu-interface (1.9.3) - - expo-dev-menu/Main (6.0.24): + - expo-dev-menu/Main (6.0.25): - DoubleConversion - EXManifests - expo-dev-menu-interface @@ -156,7 +156,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/ReactNativeCompatibles (6.0.24): + - expo-dev-menu/ReactNativeCompatibles (6.0.25): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -177,7 +177,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/SafeAreaView (6.0.24): + - expo-dev-menu/SafeAreaView (6.0.25): - DoubleConversion - ExpoModulesCore - glog @@ -199,7 +199,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - expo-dev-menu/Vendored (6.0.24): + - expo-dev-menu/Vendored (6.0.25): - DoubleConversion - expo-dev-menu/SafeAreaView - glog @@ -225,9 +225,9 @@ PODS: - ExpoModulesCore - ExpoFileSystem (18.0.12): - ExpoModulesCore - - ExpoFont (13.0.3): + - ExpoFont (13.0.4): - ExpoModulesCore - - ExpoKeepAwake (14.0.2): + - ExpoKeepAwake (14.0.3): - ExpoModulesCore - ExpoModulesCore (2.1.4): - DoubleConversion @@ -320,16 +320,16 @@ PODS: - lottie-react-native (5.1.6): - lottie-ios (~> 3.4.0) - React-Core - - MMKV (2.0.2): - - MMKVCore (~> 2.0.2) - - MMKVCore (2.0.2) + - MMKV (2.2.1): + - MMKVCore (~> 2.2.1) + - MMKVCore (2.2.1) - MultiplatformBleAdapter (0.2.0) - nanopb (2.30910.0): - nanopb/decode (= 2.30910.0) - nanopb/encode (= 2.30910.0) - nanopb/decode (2.30910.0) - nanopb/encode (2.30910.0) - - OpenSSL-Universal (3.3.2000) + - OpenSSL-Universal (3.3.3001) - Permission-BluetoothPeripheral (3.10.1): - RNPermissions - PromisesObjC (2.4.0) @@ -1675,7 +1675,7 @@ PODS: - React-Core - react-native-fast-crypto (2.2.0): - React - - react-native-get-random-values (1.8.0): + - react-native-get-random-values (1.11.0): - React-Core - react-native-gzip (1.1.0): - Base64 @@ -1690,7 +1690,7 @@ PODS: - React-Core - react-native-netinfo (9.5.0): - React-Core - - react-native-pager-view (6.7.0): + - react-native-pager-view (6.7.1): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -1808,8 +1808,8 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - react-native-view-shot (3.1.2): - - React + - react-native-view-shot (3.8.0): + - React-Core - react-native-webview-mm (14.0.4): - React-Core - React-nativeconfig (0.76.9) @@ -2076,8 +2076,27 @@ PODS: - React-Core - RNCClipboard (1.16.1): - React-Core - - RNCMaskedView (0.3.1): + - RNCMaskedView (0.3.2): + - DoubleConversion + - glog + - RCT-Folly (= 2024.10.14.00) + - RCTRequired + - RCTTypeSafety - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-jsi + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - RNDateTimePicker (7.7.0): - React-Core - RNDefaultPreference (1.4.3): @@ -2092,7 +2111,7 @@ PODS: - FirebaseCoreExtension - React-Core - RNFBApp - - RNFlashList (1.7.6): + - RNFlashList (1.8.0): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2132,7 +2151,7 @@ PODS: - React - RNPermissions (3.10.1): - React-Core - - RNReanimated (3.17.2): + - RNReanimated (3.17.5): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2152,10 +2171,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.17.2) - - RNReanimated/worklets (= 3.17.2) + - RNReanimated/reanimated (= 3.17.5) + - RNReanimated/worklets (= 3.17.5) - Yoga - - RNReanimated/reanimated (3.17.2): + - RNReanimated/reanimated (3.17.5): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2175,9 +2194,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.17.2) + - RNReanimated/reanimated/apple (= 3.17.5) - Yoga - - RNReanimated/reanimated/apple (3.17.2): + - RNReanimated/reanimated/apple (3.17.5): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2198,7 +2217,7 @@ PODS: - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - Yoga - - RNReanimated/worklets (3.17.2): + - RNReanimated/worklets (3.17.5): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2218,9 +2237,9 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - RNReanimated/worklets/apple (= 3.17.2) + - RNReanimated/worklets/apple (= 3.17.5) - Yoga - - RNReanimated/worklets/apple (3.17.2): + - RNReanimated/worklets/apple (3.17.5): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2265,7 +2284,7 @@ PODS: - Yoga - RNSensors (5.3.0): - React - - RNSentry (5.33.2): + - RNSentry (6.10.0): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2285,11 +2304,11 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - Sentry/HybridSDK (= 8.36.0) + - Sentry/HybridSDK (= 8.48.0) - Yoga - RNShare (7.3.7): - React-Core - - RNSVG (15.11.1): + - RNSVG (15.11.2): - React-Core - RNVectorIcons (10.2.0): - DoubleConversion @@ -2315,7 +2334,7 @@ PODS: - segment-analytics-react-native (2.20.3): - React-Core - sovran-react-native - - Sentry/HybridSDK (8.36.0) + - Sentry/HybridSDK (8.48.0) - SocketRocket (0.7.1) - sovran-react-native (1.0.4): - React-Core @@ -2785,14 +2804,14 @@ SPEC CHECKSUMS: EXJSONUtils: 01fc7492b66c234e395dcffdd5f53439c5c29c93 EXManifests: a19d50504b8826546a4782770317bc83fffec87d Expo: 296cbea8d4469eb60d61f09dbd4925f86d2b85da - expo-dev-client: e9b595bdf169c8f26c1e4c88af1e67172d1f872c - expo-dev-launcher: db750a5f64726a4419244d1a279bcb651a1e2262 - expo-dev-menu: 86c3c82eb691116ba7320f120811d073c02dcd75 + expo-dev-client: db44302cdbe0ec55b0ef1849c9a23a76dec6dbac + expo-dev-launcher: 7fce0956aaa7f44742edf09f9d1420a4906a54c7 + expo-dev-menu: db64396698d88d0b65490467801eb8299c3f04b4 expo-dev-menu-interface: 00dc42302a72722fdecec3fa048de84a9133bcc4 ExpoAsset: 48386d40d53a8c1738929b3ed509bcad595b5516 ExpoFileSystem: 42d363d3b96f9afab980dcef60d5657a4443c655 - ExpoFont: 38656978c2a4022fb7e0c43e4968d66340f5e2f3 - ExpoKeepAwake: 62ff49bbc3bff90d8ee28329190f9ba371bf88e7 + ExpoFont: f354e926f8feae5e831ec8087f36652b44a0b188 + ExpoKeepAwake: b0171a73665bfcefcfcc311742a72a956e6aa680 ExpoModulesCore: 77c3db9f8bd0f04af39ab8d43e3a75c23d708e2a EXUpdatesInterface: 7c977640bdd8b85833c19e3959ba46145c5719db fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6 @@ -2811,11 +2830,11 @@ SPEC CHECKSUMS: GzipSwift: 893f3e48e597a1a4f62fafcb6514220fcf8287fa lottie-ios: 016449b5d8be0c3dcbcfa0a9988469999cd04c5d lottie-react-native: 5d89c05930d4180a1e39b1757d46e6c0eec90255 - MMKV: 3eacda84cd1c4fc95cf848d3ecb69d85ed56006c - MMKVCore: 508b4d3a8ce031f1b5c8bd235f0517fb3f4c73a9 + MMKV: 383ccfa10ae23ff2a9c0f6130b7136b37b55ac10 + MMKVCore: b0e4c420da85636d7adaa535a53dfade59a22f5c MultiplatformBleAdapter: b1fddd0d499b96b607e00f0faa8e60648343dc1d nanopb: 438bc412db1928dac798aa6fd75726007be04262 - OpenSSL-Universal: b60a3702c9fea8b3145549d421fdb018e53ab7b4 + OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2 Permission-BluetoothPeripheral: 34ab829f159c6cf400c57bac05f5ba1b0af7a86e PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47 RCT-Folly: ea9d9256ba7f9322ef911169a9f696e5857b9e17 @@ -2859,13 +2878,13 @@ SPEC CHECKSUMS: react-native-compat: b17f12ba0892fe4f9d19d35ca9ae59e20fa3d10e react-native-cookies: d648ab7025833b977c0b19e142503034f5f29411 react-native-fast-crypto: 6b448866f5310cf203714a21147ef67f735bea8e - react-native-get-random-values: 0fd2b6a3129988d701d10e30f0622d5f039531bc + react-native-get-random-values: d16467cf726c618e9c7a8c3c39c31faa2244bbba react-native-gzip: 8d602277c2564591f04dd1cec4043acc8350dcc3 react-native-in-app-review: b3d1eed3d1596ebf6539804778272c4c65e4a400 react-native-launch-arguments: 7eb321ed3f3ef19b3ec4a2eca71c4f9baee76b41 react-native-mmkv: 5a46c73e3e12aa872c4485ae0e4414b4040af79a react-native-netinfo: 26560022f28c06d8ef00a9ff1e03beefbbb60c2d - react-native-pager-view: f1432471a4c00df98866cf66d911bb892985580b + react-native-pager-view: 31bcb0ec0a6d5d60b7ab659675c33c22454dfc2a react-native-performance: 125a96c145e29918b55b45ce25cbba54f1e24dcd react-native-quick-base64: daf67f19ee076b77f0755bf4056f3425f164e1d8 react-native-quick-crypto: f80a28e96010e0630c1e93aa68cc667bd2d31a44 @@ -2874,7 +2893,7 @@ SPEC CHECKSUMS: react-native-safe-area-context: 667324e20fb3dd9c39c12d6036675ed90099bcd5 react-native-slider: e21dce5f0da69ac69804fa11a382d6d320bccdde react-native-video: fc96dbbcfd9e8d6d228cfacd8258e78e9dfb0940 - react-native-view-shot: bb8934cb93bf8ec740c81ed94f93244778797b6c + react-native-view-shot: d1a701eb0719c6dccbd20b4bb43b1069f304cb70 react-native-webview-mm: d5f16bf95d45db97b53851ab87c79b2e1d964a13 React-nativeconfig: 8efdb1ef1e9158c77098a93085438f7e7b463678 React-NativeModulesApple: 2f4fd95d013b5f3f485b5e2ff267b45e4c7ffc25 @@ -2906,13 +2925,13 @@ SPEC CHECKSUMS: RNCAsyncStorage: aa75595c1aefa18f868452091fa0c411a516ce11 RNCCheckbox: 450ce156f3e29e25efa0315c96cfbabe5a39ded1 RNCClipboard: ee059e6006b137e369caed5eb852b4aad9f5d886 - RNCMaskedView: de80352547bd4f0d607bf6bab363d826822bd126 + RNCMaskedView: 747049f3a7395b3df9c518fa8b100faa170daedf RNDateTimePicker: 590f2000e4272050b98689cee6c8abc66c25bb22 RNDefaultPreference: 36fe31684af1f2d14e0664aa9a816d0ec6149cc1 RNDeviceInfo: e5219d380b51ddb7f97e650ab99a518476b90203 RNFBApp: 0e66b9f844efdf2ac3fa2b30e64c9db41a263b3d RNFBMessaging: 70b12c9f22c7c9d5011ac9b12ac2bafbfb081267 - RNFlashList: d1f56d57604eccd26584697e57744c0949c8d4af + RNFlashList: a805eb8cfe20c97a561dbdc4846e36081f2afd1e RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8 RNGestureHandler: 6572a5f44759900730562b418da289c373de8d06 RNI18n: 11ec5086508673ef71b5b567da3e8bcca8a926e1 @@ -2921,15 +2940,15 @@ SPEC CHECKSUMS: RNNotifee: 5165d37aaf980031837be3caece2eae5a6d73ae8 RNOS: d07e5090b5060c6f2b83116d740a32cfdb33afe3 RNPermissions: bd0d9ca7969ff7b999aa605ee2e5919c12522bfe - RNReanimated: fe9b82e3d1d5b25c95044045792385807fe1b252 + RNReanimated: e72e05c6e066f1b1760dd61b14773d460980b7d3 RNScreens: f20438755e7efb1812e53baf99041fa17e03b5e9 RNSensors: 4690be00931bc60be7c7bd457701edefaff965e3 - RNSentry: 325da8554c219d9298b70176ac4832e2cc3bf275 + RNSentry: cf99cf22abc943c9843af79368e20f6218dfdeee RNShare: d03cdc71e750246a48b81dcd62bd792bf57a758e - RNSVG: 86fecdfc637614ba9def63f7f3f2e7795e018356 + RNSVG: a07e14363aa208062c6483bad24a438d5986d490 RNVectorIcons: 6979cfd2d04844623f2f18ce18139bbc99e95e32 segment-analytics-react-native: 6f98edf18246782ee7428c5380c6519a3d2acf5e - Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57 + Sentry: 1ca8405451040482877dcd344dfa3ef80b646631 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 sovran-react-native: e4721a564ee6ef5b5a0d901bc677018cf371ea01 TcpSockets: 48866ffcb39d7114741919d21069fc90189e474a diff --git a/package.json b/package.json index c70d9581b583..143a7f43e20b 100644 --- a/package.json +++ b/package.json @@ -254,7 +254,7 @@ "@reown/walletkit": "^1.2.3", "@segment/sovran-react-native": "^1.0.4", "@sentry/integrations": "6.3.1", - "@sentry/react-native": "^5.33.0", + "@sentry/react-native": "~6.10.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", "@tradle/react-native-http": "2.0.1", @@ -427,7 +427,7 @@ "@open-rpc/test-coverage": "^2.2.2", "@react-native/metro-config": "0.76.9", "@rpii/wdio-html-reporter": "^7.7.1", - "@sentry/types": "^7.117.0", + "@sentry/types": "^9.15.0", "@storybook/addon-controls": "^7.5.1", "@storybook/addon-ondevice-controls": "^6.5.6", "@storybook/builder-webpack5": "^7.5.1", diff --git a/yarn.lock b/yarn.lock index cf039e2774b8..867bffbfae7d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2654,7 +2654,7 @@ resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-50.0.1.tgz#12d889214dedf64fbf2322c9d9e75c9d5ca7f695" integrity sha512-EZHMgzkWRB9SMHO1e9m8s+OMahf92XYTnsCFjxhSfcDrcEoSdFPyJWDJVloHZPMGhxns7Fi2+A+bEVN/hD4NKA== -"@expo/config-types@^52.0.3", "@expo/config-types@^52.0.5": +"@expo/config-types@^52.0.5": version "52.0.5" resolved "https://registry.yarnpkg.com/@expo/config-types/-/config-types-52.0.5.tgz#e10a226990dd903a4e3db5992ffb3015adf13f38" integrity sha512-AMDeuDLHXXqd8W+0zSjIt7f37vUd/BP8p43k68NHpyAvQO+z8mbQZm3cNQVAMySeayK2XoPigAFB1JF2NFajaA== @@ -2752,7 +2752,15 @@ temp-dir "~2.0.0" unique-string "~2.0.0" -"@expo/json-file@^9.0.1", "@expo/json-file@^9.0.2", "@expo/json-file@~9.0.1", "@expo/json-file@~9.0.2": +"@expo/json-file@^9.0.1", "@expo/json-file@^9.1.4": + version "9.1.4" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.1.4.tgz#e719d092c08afb3234643f9285e57c6a24989327" + integrity sha512-7Bv86X27fPERGhw8aJEZvRcH9sk+9BenDnEmrI3ZpywKodYSBgc8lX9Y32faNVQ/p0YbDK9zdJ0BfAKNAOyi0A== + dependencies: + "@babel/code-frame" "~7.10.4" + json5 "^2.2.3" + +"@expo/json-file@^9.0.2", "@expo/json-file@~9.0.1", "@expo/json-file@~9.0.2": version "9.0.2" resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.0.2.tgz#ec508c2ad17490e0c664c9d7e2ae0ce65915d3ed" integrity sha512-yAznIUrybOIWp3Uax7yRflB0xsEpvIwIEqIjao9SGi2Gaa+N0OamWfe0fnXBSWF+2zzF4VvqwT4W5zwelchfgw== @@ -2770,7 +2778,7 @@ json5 "^2.2.2" write-file-atomic "^2.3.0" -"@expo/metro-config@0.19.9", "@expo/metro-config@~0.19.9": +"@expo/metro-config@0.19.9": version "0.19.9" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.19.9.tgz#f020a2523cecf90e4f2a833386a88e07f6d004f8" integrity sha512-JAsLWhFQqwLH0KsI4OMbPXsKFji5KJEmsi+/02Sz1GCT17YrjRmv1fZ91regUS/FUH2Y/PDAE/+2ulrTgMeG7A== @@ -2794,31 +2802,49 @@ postcss "~8.4.32" resolve-from "^5.0.0" +"@expo/metro-config@~0.19.9": + version "0.19.12" + resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.19.12.tgz#ce6d8dec9aab790874cd0299a64968f74267db1c" + integrity sha512-fhT3x1ikQWHpZgw7VrEghBdscFPz1laRYa8WcVRB18nTTqorF6S8qPYslkJu1faEziHZS7c2uyDzTYnrg/CKbg== + dependencies: + "@babel/core" "^7.20.0" + "@babel/generator" "^7.20.5" + "@babel/parser" "^7.20.0" + "@babel/types" "^7.20.0" + "@expo/config" "~10.0.11" + "@expo/env" "~0.4.2" + "@expo/json-file" "~9.0.2" + "@expo/spawn-async" "^1.7.2" + chalk "^4.1.0" + debug "^4.3.2" + fs-extra "^9.1.0" + getenv "^1.0.0" + glob "^10.4.2" + jsc-safe-url "^0.2.4" + lightningcss "~1.27.0" + minimatch "^3.0.4" + postcss "~8.4.32" + resolve-from "^5.0.0" + "@expo/osascript@^2.1.5": - version "2.1.5" - resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.1.5.tgz#655c3913e592efbb5db41273b76920911c60809e" - integrity sha512-Cp7YF7msGiTAIbFdzNovwHBfecdMLVL5XzSqq4xQz72ALFCQ3uSIUXRph1QV2r61ugH7Yem0gY8yi7RcDlI4qg== + version "2.2.4" + resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.2.4.tgz#4414d97f91e29260a9b361529d20875430dc0af5" + integrity sha512-Q+Oyj+1pdRiHHpev9YjqfMZzByFH8UhKvSszxa0acTveijjDhQgWrq4e9T/cchBHi0GWZpGczWyiyJkk1wM1dg== dependencies: "@expo/spawn-async" "^1.7.2" exec-async "^2.2.0" "@expo/package-manager@^1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@expo/package-manager/-/package-manager-1.7.1.tgz#13eb686bc949a395d992fb2575f8a1930a6aebf3" - integrity sha512-DKbELrTOdl7U3KT0C07Aka9P+sUP3LL+1UTKf1KmLx2x2gPH1IC+c68N7iQlwNt+yA37qIw6/vKoqyTGu5EL9g== + version "1.8.4" + resolved "https://registry.yarnpkg.com/@expo/package-manager/-/package-manager-1.8.4.tgz#6126d93b25bbfec515436833e6f6ca5677b7e8bd" + integrity sha512-8H8tLga/NS3iS7QaX/NneRPqbObnHvVCfMCo0ShudreOFmvmgqhYjRlkZTRstSyFqefai8ONaT4VmnLHneRYYg== dependencies: - "@expo/json-file" "^9.0.1" + "@expo/json-file" "^9.1.4" "@expo/spawn-async" "^1.7.2" - ansi-regex "^5.0.0" chalk "^4.0.0" - find-up "^5.0.0" - js-yaml "^3.13.1" - micromatch "^4.0.8" npm-package-arg "^11.0.0" ora "^3.4.0" resolve-workspace-root "^2.0.0" - split "^1.0.1" - sudo-prompt "9.1.1" "@expo/plist@^0.0.20": version "0.0.20" @@ -2839,16 +2865,16 @@ xmlbuilder "^14.0.0" "@expo/prebuild-config@^8.0.25": - version "8.0.25" - resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.0.25.tgz#c802303030377e73b6c405ef3200a8c751f7631a" - integrity sha512-xYHV8eiydZEDedf2AGaOFRFwcGlaSzrqQH94dwX42urNCU03FO0RUb7yPp4nkb7WNFg5Ov6PDsV7ES+YwzNgYQ== + version "8.2.0" + resolved "https://registry.yarnpkg.com/@expo/prebuild-config/-/prebuild-config-8.2.0.tgz#eeca7c58000bacf4e3e60c6953261f78405eedbc" + integrity sha512-CxiPpd980s0jyxi7eyN3i/7YKu3XL+8qPjBZUCYtc0+axpGweqIkq2CslyLSKHyqVyH/zlPkbVgWdyiYavFS5Q== dependencies: - "@expo/config" "~10.0.8" - "@expo/config-plugins" "~9.0.14" - "@expo/config-types" "^52.0.3" - "@expo/image-utils" "^0.6.4" - "@expo/json-file" "^9.0.1" - "@react-native/normalize-colors" "0.76.6" + "@expo/config" "~10.0.11" + "@expo/config-plugins" "~9.0.17" + "@expo/config-types" "^52.0.5" + "@expo/image-utils" "^0.6.5" + "@expo/json-file" "^9.0.2" + "@react-native/normalize-colors" "0.76.9" debug "^4.3.1" fs-extra "^9.0.0" resolve-from "^5.0.0" @@ -6992,9 +7018,9 @@ integrity sha512-S3M9zHJ3zKRH6PuxxjOrV9i0uRO3S5rGYaY3s64BTh4iLEG46UDgJ5uA+WsY+9IsJtSpN4HYDcvnwoxasiEUfw== "@react-native-masked-view/masked-view@^0.3.1": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@react-native-masked-view/masked-view/-/masked-view-0.3.1.tgz#5bd76f17004a6ccbcec03856893777ee91f23d29" - integrity sha512-uVm8U6nwFIlUd1iDIB5cS+lDadApKR+l8k4k84d9hn+GN4lzAIJhUZ9syYX7c022MxNgAlbxoFLt0pqKoyaAGg== + version "0.3.2" + resolved "https://registry.yarnpkg.com/@react-native-masked-view/masked-view/-/masked-view-0.3.2.tgz#7064533a573e3539ec912f59c1f457371bf49dd9" + integrity sha512-XwuQoW7/GEgWRMovOQtX3A4PrXhyaZm0lVUiY8qJDvdngjLms9Cpdck6SmGAUNqQwcj2EadHC1HwL0bEyoa/SQ== "@react-native/assets-registry@0.76.9": version "0.76.9" @@ -7006,13 +7032,6 @@ resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.77.1.tgz#1ae623ae42c66931ca7c3a7f483f61a95a952c2d" integrity sha512-bAQHOgqGZnF6xdYE9sJrbZ7F65Z25yLi9yWps8vOByKtj0b+f3FJhsU3Mcfy1uWvelpNEGebOLQf+WEPiwGrkw== -"@react-native/babel-plugin-codegen@0.76.6": - version "0.76.6" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.6.tgz#0c249966ab43ac2200aadd051abcec4691c9a845" - integrity sha512-yFC9I/aDBOBz3ZMlqKn2NY/mDUtCksUNZ7AQmBiTAeVTUP0ujEjE0hTOx5Qd+kok7A7hwZEX87HdSgjiJZfr5g== - dependencies: - "@react-native/codegen" "0.76.6" - "@react-native/babel-plugin-codegen@0.76.9": version "0.76.9" resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.76.9.tgz#56c4bc21d08ea522e7266ffcec7d5a52e9092a0e" @@ -7028,57 +7047,6 @@ "@babel/traverse" "^7.25.3" "@react-native/codegen" "0.77.1" -"@react-native/babel-preset@0.76.6": - version "0.76.6" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.76.6.tgz#f84fd12ceb2961946c599714d379bf900e140952" - integrity sha512-ojlVWY6S/VE/nb9hIRetPMTsW9ZmGb2R3dnToEXAtQQDz41eHMHXbkw/k2h0THp6qhas25ruNvn3N5n2o+lBzg== - dependencies: - "@babel/core" "^7.25.2" - "@babel/plugin-proposal-export-default-from" "^7.24.7" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-default-from" "^7.24.7" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-transform-arrow-functions" "^7.24.7" - "@babel/plugin-transform-async-generator-functions" "^7.25.4" - "@babel/plugin-transform-async-to-generator" "^7.24.7" - "@babel/plugin-transform-block-scoping" "^7.25.0" - "@babel/plugin-transform-class-properties" "^7.25.4" - "@babel/plugin-transform-classes" "^7.25.4" - "@babel/plugin-transform-computed-properties" "^7.24.7" - "@babel/plugin-transform-destructuring" "^7.24.8" - "@babel/plugin-transform-flow-strip-types" "^7.25.2" - "@babel/plugin-transform-for-of" "^7.24.7" - "@babel/plugin-transform-function-name" "^7.25.1" - "@babel/plugin-transform-literals" "^7.25.2" - "@babel/plugin-transform-logical-assignment-operators" "^7.24.7" - "@babel/plugin-transform-modules-commonjs" "^7.24.8" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.24.7" - "@babel/plugin-transform-nullish-coalescing-operator" "^7.24.7" - "@babel/plugin-transform-numeric-separator" "^7.24.7" - "@babel/plugin-transform-object-rest-spread" "^7.24.7" - "@babel/plugin-transform-optional-catch-binding" "^7.24.7" - "@babel/plugin-transform-optional-chaining" "^7.24.8" - "@babel/plugin-transform-parameters" "^7.24.7" - "@babel/plugin-transform-private-methods" "^7.24.7" - "@babel/plugin-transform-private-property-in-object" "^7.24.7" - "@babel/plugin-transform-react-display-name" "^7.24.7" - "@babel/plugin-transform-react-jsx" "^7.25.2" - "@babel/plugin-transform-react-jsx-self" "^7.24.7" - "@babel/plugin-transform-react-jsx-source" "^7.24.7" - "@babel/plugin-transform-regenerator" "^7.24.7" - "@babel/plugin-transform-runtime" "^7.24.7" - "@babel/plugin-transform-shorthand-properties" "^7.24.7" - "@babel/plugin-transform-spread" "^7.24.7" - "@babel/plugin-transform-sticky-regex" "^7.24.7" - "@babel/plugin-transform-typescript" "^7.25.2" - "@babel/plugin-transform-unicode-regex" "^7.24.7" - "@babel/template" "^7.25.0" - "@react-native/babel-plugin-codegen" "0.76.6" - babel-plugin-syntax-hermes-parser "^0.25.1" - babel-plugin-transform-flow-enums "^0.0.2" - react-refresh "^0.14.0" - "@react-native/babel-preset@0.76.9": version "0.76.9" resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.76.9.tgz#08bc4198c67a0d07905dcc48cb4105b8d0f6ecd9" @@ -7181,20 +7149,6 @@ babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" -"@react-native/codegen@0.76.6": - version "0.76.6" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.76.6.tgz#1c6822c59ac25a1ce608562481caf25e535f091f" - integrity sha512-BABb3e5G/+hyQYEYi0AODWh2km2d8ERoASZr6Hv90pVXdUHRYR+yxCatX7vSd9rnDUYndqRTzD0hZWAucPNAKg== - dependencies: - "@babel/parser" "^7.25.3" - glob "^7.1.1" - hermes-parser "0.23.1" - invariant "^2.2.4" - jscodeshift "^0.14.0" - mkdirp "^0.5.1" - nullthrows "^1.1.1" - yargs "^17.6.2" - "@react-native/codegen@0.76.9": version "0.76.9" resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.76.9.tgz#b386fae4d893e5e7ffba19833c7d31a330a2f559" @@ -7401,11 +7355,6 @@ resolved "https://registry.yarnpkg.com/@react-native/normalize-color/-/normalize-color-2.1.0.tgz#939b87a9849e81687d3640c5efa2a486ac266f91" integrity sha512-Z1jQI2NpdFJCVgpY+8Dq/Bt3d+YUi1928Q+/CZm/oh66fzM0RUl54vvuXlPJKybH4pdCZey1eDTPaLHkMPNgWA== -"@react-native/normalize-colors@0.76.6": - version "0.76.6" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.6.tgz#c2688aee5a824ad5331bb2b01791b024cd6643ea" - integrity sha512-1n4udXH2Cla31iA/8eLRdhFHpYUYK1NKWCn4m1Sr9L4SarWKAYuRFliK1fcLvPPALCFoFlWvn8I0ekdUOHMzDQ== - "@react-native/normalize-colors@0.76.9": version "0.76.9" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.76.9.tgz#1c45ce49871ccea7d6fa9332cb14724adf326d6a" @@ -7651,92 +7600,91 @@ dset "^3.1.1" tiny-hashes "^1.0.1" -"@sentry-internal/feedback@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.119.1.tgz#98285dc9dba0ab62369d758124901b00faf58697" - integrity sha512-EPyW6EKZmhKpw/OQUPRkTynXecZdYl4uhZwdZuGqnGMAzswPOgQvFrkwsOuPYvoMfXqCH7YuRqyJrox3uBOrTA== +"@sentry-internal/browser-utils@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.54.0.tgz#2d68c7fa843db867ed98059faf1a750be3eca95a" + integrity sha512-DKWCqb4YQosKn6aD45fhKyzhkdG7N6goGFDeyTaJFREJDFVDXiNDsYZu30nJ6BxMM7uQIaARhPAC5BXfoED3pQ== dependencies: - "@sentry/core" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" + "@sentry/core" "8.54.0" -"@sentry-internal/replay-canvas@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.119.1.tgz#b1413fb37734d609b0745ac24d49ddf9d63b9c51" - integrity sha512-O/lrzENbMhP/UDr7LwmfOWTjD9PLNmdaCF408Wx8SDuj7Iwc+VasGfHg7fPH4Pdr4nJON6oh+UqoV4IoG05u+A== +"@sentry-internal/feedback@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.54.0.tgz#52c3a63aa5b520eca7acfa1376621e8441984126" + integrity sha512-nQqRacOXoElpE0L0ADxUUII0I3A94niqG9Z4Fmsw6057QvyrV/LvTiMQBop6r5qLjwMqK+T33iR4/NQI5RhsXQ== dependencies: - "@sentry/core" "7.119.1" - "@sentry/replay" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" + "@sentry/core" "8.54.0" -"@sentry-internal/tracing@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.119.1.tgz#500d50d451bfd0ce6b185e9f112208229739ab03" - integrity sha512-cI0YraPd6qBwvUA3wQdPGTy8PzAoK0NZiaTN1LM3IczdPegehWOaEG5GVTnpGnTsmBAzn1xnBXNBhgiU4dgcrQ== +"@sentry-internal/replay-canvas@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.54.0.tgz#e57a3893db2bb0ea7ad9dc2a804bb035142fe3ba" + integrity sha512-K/On3OAUBeq/TV2n+1EvObKC+WMV9npVXpVyJqCCyn8HYMm8FUGzuxeajzm0mlW4wDTPCQor6mK9/IgOquUzCw== dependencies: - "@sentry/core" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" + "@sentry-internal/replay" "8.54.0" + "@sentry/core" "8.54.0" -"@sentry/babel-plugin-component-annotate@2.20.1": - version "2.20.1" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-2.20.1.tgz#204c63ed006a048f48f633876e1b8bacf87a9722" - integrity sha512-4mhEwYTK00bIb5Y9UWIELVUfru587Vaeg0DQGswv4aIRHIiMKLyNqCEejaaybQ/fNChIZOKmvyqXk430YVd7Qg== - -"@sentry/browser@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.119.1.tgz#260470dd7fd18de366017c3bf23a252a24d2ff05" - integrity sha512-aMwAnFU4iAPeLyZvqmOQaEDHt/Dkf8rpgYeJ0OEi50dmP6AjG+KIAMCXU7CYCCQDn70ITJo8QD5+KzCoZPYz0A== - dependencies: - "@sentry-internal/feedback" "7.119.1" - "@sentry-internal/replay-canvas" "7.119.1" - "@sentry-internal/tracing" "7.119.1" - "@sentry/core" "7.119.1" - "@sentry/integrations" "7.119.1" - "@sentry/replay" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" - -"@sentry/cli-darwin@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.36.6.tgz#c023d9552e141144dfb6512389fa253611be5877" - integrity sha512-2yKECENqMZKrJY5weA19g4gTgQfeuadWvVu7fVQVsgqoBRIaEhSHJc64ZgiHq2ur06qOuYcQr5FO1VrwUE1pZg== - -"@sentry/cli-linux-arm64@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.36.6.tgz#6f0c604b5401441e62e89c3fe4450784dd93fda6" - integrity sha512-sLmmbZRE7F6UksovwcqEQ7oYXVBejpeL1CtiKVFwNoq9XB5kTiKlVColn+3yPcfwKCNj4H4HoeKc+xMtdd7wow== - -"@sentry/cli-linux-arm@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.36.6.tgz#9cc4b041fc8e20e52f745128aa8acff2b3783fa9" - integrity sha512-6zB7w5NawmdzhPHxqkjlhbvQugCBiFrFaUGvb3u1Oo/VCehdmq/v4v8ob4PNN2cJhoDRqQj2mPTfL/ppYNMJuw== - -"@sentry/cli-linux-i686@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.36.6.tgz#7c7b1c0ac83f89eda844586d51809797a868827b" - integrity sha512-M1pdxv7eZdGoG1wDpRb28aRUs/qb0C5jAe+a7sWHIg463jRLAahM8NDkv2bRQv0Xhw3JIkEGGvr46mPkQrOuMQ== - -"@sentry/cli-linux-x64@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.36.6.tgz#eaec558b30acec0a295f737558db3a640cc02906" - integrity sha512-gVy/zAWY2DEERQ/i3V+oruMas/U29/tsRPcRkB67MIUWbW7W46+c3yH490O+t49qMYYhKYG2YfWoTzW6qMtSlA== - -"@sentry/cli-win32-i686@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.36.6.tgz#29f586279e354c6fad932d09da5f32e57e883caf" - integrity sha512-urH+i+WtPeW8Dund0xY8zObvvbMM0XxeEIUS4oFBCB3EMYHVxgNw+woQUv9Vyv7v+OBjckB/r27nxlwNBj4pbg== - -"@sentry/cli-win32-x64@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.36.6.tgz#b283460682a0cb824c4e16fc803de5f538bd1fcb" - integrity sha512-ZauqOqwFAqb/Njyc8Kj2l9Fhbms7T5zB2yu5zwvq1uiqhXqLmsb9mRTF8WJWl9WmO5hwq/GTOEQowvrwK8gblw== - -"@sentry/cli@2.36.6": - version "2.36.6" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.36.6.tgz#116d2441b7e3ac49d4d5b4c09ed8e00ac9c8a67e" - integrity sha512-1fcZVwe4H6a3Z1O+7m/z/2em1u67Tf0Zrt2oGEp82bqvCOHA904Wr2otc6GBEuFESB1/Mo8QgD/qwRd9Tv0Otw== +"@sentry-internal/replay@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.54.0.tgz#b92990a51ffbe8d92998ff8188db9e3a6f9d1e18" + integrity sha512-8xuBe06IaYIGJec53wUC12tY2q4z2Z0RPS2s1sLtbA00EvK1YDGuXp96IDD+HB9mnDMrQ/jW5f97g9TvPsPQUg== + dependencies: + "@sentry-internal/browser-utils" "8.54.0" + "@sentry/core" "8.54.0" + +"@sentry/babel-plugin-component-annotate@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.2.2.tgz#0c5f26e417b8f524924fa4531b82ad5603216e90" + integrity sha512-D+SKQ266ra/wo87s9+UI/rKQi3qhGPCR8eSCDe0VJudhjHsqyNU+JJ5lnIGCgmZaWFTXgdBP/gdr1Iz1zqGs4Q== + +"@sentry/browser@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.54.0.tgz#5487075908aac564892e689e1b6d233fdb314f5b" + integrity sha512-BgUtvxFHin0fS0CmJVKTLXXZcke0Av729IVfi+2fJ4COX8HO7/HAP02RKaSQGmL2HmvWYTfNZ7529AnUtrM4Rg== + dependencies: + "@sentry-internal/browser-utils" "8.54.0" + "@sentry-internal/feedback" "8.54.0" + "@sentry-internal/replay" "8.54.0" + "@sentry-internal/replay-canvas" "8.54.0" + "@sentry/core" "8.54.0" + +"@sentry/cli-darwin@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.42.4.tgz#029521d3052c644e3bac1c926e53d1e658b8cb28" + integrity sha512-PZV4Y97VDWBR4rIt0HkJfXaBXlebIN2s/FDzC3iHINZE5OG62CDFsnC4/lbGlf2/UZLDaGGIK7mYwSHhTvN+HQ== + +"@sentry/cli-linux-arm64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.42.4.tgz#b5e2d2399764998e3d661f144aae0c3f3495d1f1" + integrity sha512-Ex8vRnryyzC/9e43daEmEqPS+9uirY/l6Hw2lAvhBblFaL7PTWNx52H+8GnYGd9Zy2H3rWNyBDYfHwnErg38zA== + +"@sentry/cli-linux-arm@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.42.4.tgz#286996c3969a553c07a74a2a67c6d3671e2c79b5" + integrity sha512-lBn0oeeg62h68/4Eo6zbPq99Idz5t0VRV48rEU/WKeM4MtQCvG/iGGQ3lBFW2yNiUBzXZIK9poXLEcgbwmcRVw== + +"@sentry/cli-linux-i686@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.42.4.tgz#03e72598dc37e96a99e4329e20db9e74df277f83" + integrity sha512-IBJg0aHjsLCL4LvcFa3cXIjA+4t5kPqBT9y+PoDu4goIFxYD8zl7mbUdGJutvJafTk8Akf4ss4JJXQBjg019zA== + +"@sentry/cli-linux-x64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.42.4.tgz#a3bc31a909f61029620e5d2ae0f8d8625ed8982a" + integrity sha512-gXI5OEiOSNiAEz7VCE6AZcAgHJ47mlgal3+NmbE8XcHmFOnyDws9FNie6PJAy8KZjXi3nqoBP9JVAbnmOix3uA== + +"@sentry/cli-win32-i686@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.42.4.tgz#0de663fc574f4bce2057e099c5b76b65f99a3bd6" + integrity sha512-vZuR3UPHKqOMniyrijrrsNwn9usaRysXq78F6WV0cL0ZyPLAmY+KBnTDSFk1Oig2pURnzaTm+RtcZu2fc8mlzg== + +"@sentry/cli-win32-x64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.42.4.tgz#f572a03084f3b1a4f355c1fbeb1339cb56ad91c9" + integrity sha512-OIBj3uaQ6nAERSm5Dcf8UIhyElEEwMNsZEEppQpN4IKl0mrwb/57AznM23Dvpu6GR8WGbVQUSolt879YZR5E9g== + +"@sentry/cli@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.42.4.tgz#df6ac3e92a60a715b231873433894ed77e601086" + integrity sha512-BoSZDAWJiz/40tu6LuMDkSgwk4xTsq6zwqYoUqLU3vKBR/VsaaQGvu6EWxZXORthfZU2/5Agz0+t220cge6VQw== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -7744,38 +7692,23 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.36.6" - "@sentry/cli-linux-arm" "2.36.6" - "@sentry/cli-linux-arm64" "2.36.6" - "@sentry/cli-linux-i686" "2.36.6" - "@sentry/cli-linux-x64" "2.36.6" - "@sentry/cli-win32-i686" "2.36.6" - "@sentry/cli-win32-x64" "2.36.6" - -"@sentry/core@7.119.0": - version "7.119.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.119.0.tgz#a6e41119bb03ec27689f9ad04e79d1fba5b7fc37" - integrity sha512-CS2kUv9rAJJEjiRat6wle3JATHypB0SyD7pt4cpX5y0dN5dZ1JrF57oLHRMnga9fxRivydHz7tMTuBhSSwhzjw== - dependencies: - "@sentry/types" "7.119.0" - "@sentry/utils" "7.119.0" - -"@sentry/core@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.119.1.tgz#63e949cad167a0ee5e52986c93b96ff1d6a05b57" - integrity sha512-YUNnH7O7paVd+UmpArWCPH4Phlb5LwrkWVqzFWqL3xPyCcTSof2RL8UmvpkTjgYJjJ+NDfq5mPFkqv3aOEn5Sw== - dependencies: - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" - -"@sentry/hub@7.119.0": - version "7.119.0" - resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-7.119.0.tgz#a94d657b9d3cfd4cc061c5c238f86faefb55d5d8" - integrity sha512-183h5B/rZosLxpB+ZYOvFdHk0rwZbKskxqKFtcyPbDAfpCUgCass41UTqyxF6aH1qLgCRxX8GcLRF7frIa/SOg== - dependencies: - "@sentry/core" "7.119.0" - "@sentry/types" "7.119.0" - "@sentry/utils" "7.119.0" + "@sentry/cli-darwin" "2.42.4" + "@sentry/cli-linux-arm" "2.42.4" + "@sentry/cli-linux-arm64" "2.42.4" + "@sentry/cli-linux-i686" "2.42.4" + "@sentry/cli-linux-x64" "2.42.4" + "@sentry/cli-win32-i686" "2.42.4" + "@sentry/cli-win32-x64" "2.42.4" + +"@sentry/core@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.54.0.tgz#a2ebec965cadcb6de89e116689feeef79d5862a6" + integrity sha512-03bWf+D1j28unOocY/5FDB6bUHtYlm6m6ollVejhg45ZmK9iPjdtxNWbrLsjT1WRym0Tjzowu+A3p+eebYEv0Q== + +"@sentry/core@9.15.0": + version "9.15.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.15.0.tgz#590f16a15596ce01db49d9d80b31cb18048ca9a4" + integrity sha512-lBmo3bzzaYUesdzc2H5K3fajfXyUNuj5koqyFoCAI8rnt9CBl7SUc/P07+E5eipF8mxgiU3QtkI7ALzRQN8pqQ== "@sentry/integrations@6.3.1": version "6.3.1" @@ -7787,76 +7720,46 @@ localforage "^1.8.1" tslib "^1.9.3" -"@sentry/integrations@7.119.0": - version "7.119.0" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.119.0.tgz#5b25c603026dbacfe1ae7bb8d768506a129149fb" - integrity sha512-OHShvtsRW0A+ZL/ZbMnMqDEtJddPasndjq+1aQXw40mN+zeP7At/V1yPZyFaURy86iX7Ucxw5BtmzuNy7hLyTA== - dependencies: - "@sentry/core" "7.119.0" - "@sentry/types" "7.119.0" - "@sentry/utils" "7.119.0" - localforage "^1.8.1" - -"@sentry/integrations@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.119.1.tgz#9fc17aa9fcb942fbd2fc12eecd77a0f316897960" - integrity sha512-CGmLEPnaBqbUleVqrmGYjRjf5/OwjUXo57I9t0KKWViq81mWnYhaUhRZWFNoCNQHns+3+GPCOMvl0zlawt+evw== - dependencies: - "@sentry/core" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" - localforage "^1.8.1" - -"@sentry/react-native@^5.33.0": - version "5.33.2" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-5.33.2.tgz#6279a447a4286d0428610d4596b18d7626488160" - integrity sha512-wjNiKYqtcW3JtA6Sg7VJ0xPTaVVMvKtb9R/rtkADjYqsvXFl740YUcwD4TfMHs7UoOvMkP6E941EU1kxGlD6jA== - dependencies: - "@sentry/babel-plugin-component-annotate" "2.20.1" - "@sentry/browser" "7.119.1" - "@sentry/cli" "2.36.6" - "@sentry/core" "7.119.1" - "@sentry/hub" "7.119.0" - "@sentry/integrations" "7.119.0" - "@sentry/react" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" - -"@sentry/react@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.119.1.tgz#5cd76fe42209a1cfca6d5197e25c0c8d18299d56" - integrity sha512-Bri314LnSVm16K3JATgn3Zsq6Uj3M/nIjdUb3nggBw0BMlFWMsyFjUCfmCio5d80KJK/lUjOIxRjzu79M6jOzQ== - dependencies: - "@sentry/browser" "7.119.1" - "@sentry/core" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" +"@sentry/react-native@~6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-6.10.0.tgz#9efafb9b85870bd4c5189763edde30709b9f3213" + integrity sha512-B56vc+pnFHMiu3cabFb454v4qD0zObW6JVzJ5Gb6fIMdt93AFIJg10ZErzC+ump7xM4BOEROFFRuLiyvadvlPA== + dependencies: + "@sentry/babel-plugin-component-annotate" "3.2.2" + "@sentry/browser" "8.54.0" + "@sentry/cli" "2.42.4" + "@sentry/core" "8.54.0" + "@sentry/react" "8.54.0" + "@sentry/types" "8.54.0" + "@sentry/utils" "8.54.0" + +"@sentry/react@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.54.0.tgz#16cec103b5d5697bdfebacf6e2d35f19699b3ab3" + integrity sha512-42T/fp8snYN19Fy/2P0Mwotu4gcdy+1Lx+uYCNcYP1o7wNGigJ7qb27sW7W34GyCCHjoCCfQgeOqDQsyY8LC9w== + dependencies: + "@sentry/browser" "8.54.0" + "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" -"@sentry/replay@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.119.1.tgz#117cf493a3008a39943b7d571d451c6218542847" - integrity sha512-4da+ruMEipuAZf35Ybt2StBdV1S+oJbSVccGpnl9w6RoeQoloT4ztR6ML3UcFDTXeTPT1FnHWDCyOfST0O7XMw== - dependencies: - "@sentry-internal/tracing" "7.119.1" - "@sentry/core" "7.119.1" - "@sentry/types" "7.119.1" - "@sentry/utils" "7.119.1" - "@sentry/types@6.3.1": version "6.3.1" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.3.1.tgz#af3b54728b29f633f38fbe51b8c10e3834fbc158" integrity sha512-BEBn8JX1yaooCAuonbaMci9z0RjwwMbQ3Eny/eyDdd+rjXprZCZaStZnCvSThbNBqAJ8YaUqY2YBMnEwJxarAw== -"@sentry/types@7.119.0": - version "7.119.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.119.0.tgz#8b3d7a1405c362e75cd900d46089df4e70919d2a" - integrity sha512-27qQbutDBPKGbuJHROxhIWc1i0HJaGLA90tjMu11wt0E4UNxXRX+UQl4Twu68v4EV3CPvQcEpQfgsViYcXmq+w== +"@sentry/types@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36" + integrity sha512-wztdtr7dOXQKi0iRvKc8XJhJ7HaAfOv8lGu0yqFOFwBZucO/SHnu87GOPi8mvrTiy1bentQO5l+zXWAaMvG4uw== + dependencies: + "@sentry/core" "8.54.0" -"@sentry/types@7.119.1", "@sentry/types@^7.117.0": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.119.1.tgz#f9c3c12e217c9078a6d556c92590e42a39b750dd" - integrity sha512-4G2mcZNnYzK3pa2PuTq+M2GcwBRY/yy1rF+HfZU+LAPZr98nzq2X3+mJHNJoobeHRkvVh7YZMPi4ogXiIS5VNQ== +"@sentry/types@^9.15.0": + version "9.15.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-9.15.0.tgz#dd1342be83879d2c6cddbb4fd5b8ca6128caba4d" + integrity sha512-txQhb39vySyfiOo5w132lGylip0hyFZU5q4hgdILm2DbDVtvQN+MrXS1ocjlw9VyxhkT6Q/6W/q0pwkMRv6rIg== + dependencies: + "@sentry/core" "9.15.0" "@sentry/utils@6.3.1": version "6.3.1" @@ -7866,24 +7769,17 @@ "@sentry/types" "6.3.1" tslib "^1.9.3" -"@sentry/utils@7.119.0": - version "7.119.0" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.119.0.tgz#debe29020f6ef3786a5bd855cf1b97116b7be826" - integrity sha512-ZwyXexWn2ZIe2bBoYnXJVPc2esCSbKpdc6+0WJa8eutXfHq3FRKg4ohkfCBpfxljQGEfP1+kfin945lA21Ka+A== +"@sentry/utils@8.54.0": + version "8.54.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.54.0.tgz#5e28e03a249451b4a55200a0787f4e2c59bab2c5" + integrity sha512-JL8UDjrsKxKclTdLXfuHfE7B3KbrAPEYP7tMyN/xiO2vsF6D84fjwYyalO0ZMtuFZE6vpSze8ZOLEh6hLnPYsw== dependencies: - "@sentry/types" "7.119.0" - -"@sentry/utils@7.119.1": - version "7.119.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.119.1.tgz#08b28fa8170987a60e149e2102e83395a95e9a89" - integrity sha512-ju/Cvyeu/vkfC5/XBV30UNet5kLEicZmXSyuLwZu95hEbL+foPdxN+re7pCI/eNqfe3B2vz7lvz5afLVOlQ2Hg== - dependencies: - "@sentry/types" "7.119.1" + "@sentry/core" "8.54.0" "@shopify/flash-list@^1.7.6": - version "1.7.6" - resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-1.7.6.tgz#367e76866c71d1f1be0ff70f0b28be4bbfbcf595" - integrity sha512-0kuuAbWgy4YSlN05mt0ScvxK8uiDixMsICWvDed+LTxvZ5+5iRyt3M8cRLUroB8sfiZlJJZWlxHrx0frBpsYOQ== + version "1.8.0" + resolved "https://registry.yarnpkg.com/@shopify/flash-list/-/flash-list-1.8.0.tgz#d271d3ca49acf9f53812594f0c4d24a994eb95e5" + integrity sha512-APZ48kceCCJobUimmI2594io+HujELK60HFKgzIyIdHGX5ySR5YfvsPy3PKtPwHHDtIMFNaq3U/BY3qZocOhCA== dependencies: recyclerlistview "4.2.3" tslib "2.8.1" @@ -12991,9 +12887,9 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-top-level-await" "^7.8.3" babel-preset-expo@~12.0.6: - version "12.0.6" - resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-12.0.6.tgz#2f39fe421d5ba9a0ce74dcd918a458c62c6601da" - integrity sha512-az3H7gDVo0wxNBAFES8h5vLLWE8NPGkD9g5P962hDEOqZUdyPacb9MOzicypeLmcq9zQWr6E3iVtEHoNagCTTQ== + version "12.0.11" + resolved "https://registry.yarnpkg.com/babel-preset-expo/-/babel-preset-expo-12.0.11.tgz#3bbac54f269ae0cc94d198260e26d5020d146127" + integrity sha512-4m6D92nKEieg+7DXa8uSvpr0GjfuRfM/G0t0I/Q5hF8HleEv5ms3z4dJ+p52qXSJsm760tMqLdO93Ywuoi7cCQ== dependencies: "@babel/plugin-proposal-decorators" "^7.12.9" "@babel/plugin-transform-export-namespace-from" "^7.22.11" @@ -13001,7 +12897,7 @@ babel-preset-expo@~12.0.6: "@babel/plugin-transform-parameters" "^7.22.15" "@babel/preset-react" "^7.22.15" "@babel/preset-typescript" "^7.23.0" - "@react-native/babel-preset" "0.76.6" + "@react-native/babel-preset" "0.76.9" babel-plugin-react-native-web "~0.19.13" react-refresh "^0.14.2" @@ -13100,6 +12996,11 @@ base64-arraybuffer@^0.1.5: resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz#73926771923b5a19747ad666aa5cd4bf9c6e9ce8" integrity sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g== +base64-arraybuffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz#1c37589a7c4b0746e34bd1feb951da2df01c1bdc" + integrity sha512-I3yl4r9QB5ZRY3XuJVEPfc2XhZO6YweFPI+UovAzn+8/hb3oJ6lnysaFcjVpkCPfVWFUDvoZ8kmVDP7WyRtYtQ== + base64-js@1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" @@ -14801,6 +14702,13 @@ css-color-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU= +css-line-break@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/css-line-break/-/css-line-break-2.1.0.tgz#bfef660dfa6f5397ea54116bb3cb4873edbc4fa0" + integrity sha512-FHcKFCZcAha3LwfVBhCQbW2nCNbkZXn7KVUJcsT5/P8YmfsVja0FMPJr0B903j/E69HUphKiV9iQArX8SDYA4w== + dependencies: + utrie "^1.0.2" + css-loader@^6.7.1: version "6.8.1" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.8.1.tgz#0f8f52699f60f5e679eab4ec0fcd68b8e8a50a88" @@ -15127,7 +15035,7 @@ decompress-response@^6.0.0: dedent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.6.0.tgz#0e6da8f0ce52838ef5cec5c8f9396b0c1b64a3cb" - integrity sha1-Dm2o8M5Sg471zsXI+TlrDBtko8s= + integrity sha512-cSfRWjXJtZQeRuZGVvDrJroCR5V2UvBNUMHsPCdNYzuAG8b9V8aAy3KUcdQrGQPXs17Y+ojbPh1aOCplg9YR9g== dedent@^0.7.0: version "0.7.0" @@ -17128,23 +17036,23 @@ expo-constants@~17.0.4, expo-constants@~17.0.8: "@expo/env" "~0.4.2" expo-dev-client@~5.0.18: - version "5.0.19" - resolved "https://registry.yarnpkg.com/expo-dev-client/-/expo-dev-client-5.0.19.tgz#bf6899850f1df00a2efefbd4765ff71fa8a86a14" - integrity sha512-HwI1VSYLCqnRc7GZdLqEb0yWfSieyG7TEWPG97SMMQkb4qJ930cxLXATbr4r//Z00NJ+U6CwjHnehKZWJqGjuw== + version "5.0.20" + resolved "https://registry.yarnpkg.com/expo-dev-client/-/expo-dev-client-5.0.20.tgz#349a6251d1d63c3142ad5232be653038b5c6cf15" + integrity sha512-bLNkHdU7V3I4UefgJbJnIDUBUL0LxIal/xYEx9BbgDd3B7wgQKY//+BpPIxBOKCQ22lkyiHY8y9tLhO903sAgg== dependencies: - expo-dev-launcher "5.0.34" - expo-dev-menu "6.0.24" + expo-dev-launcher "5.0.35" + expo-dev-menu "6.0.25" expo-dev-menu-interface "1.9.3" expo-manifests "~0.15.8" expo-updates-interface "~1.0.0" -expo-dev-launcher@5.0.34: - version "5.0.34" - resolved "https://registry.yarnpkg.com/expo-dev-launcher/-/expo-dev-launcher-5.0.34.tgz#e2cc9a95e732e7f0556cc2a9b063a034a08db17d" - integrity sha512-FEGPkZCsYCSgDRKuJiLTDWtQWWLH3xiIw8FQ509+wiLqfiaVQ321RnYTPeu/Oo1r0WJGaPrEChRLezThXVb8MQ== +expo-dev-launcher@5.0.35: + version "5.0.35" + resolved "https://registry.yarnpkg.com/expo-dev-launcher/-/expo-dev-launcher-5.0.35.tgz#098004658ccb9a55f4170427eb1a35eaf42cea17" + integrity sha512-hEQr0ZREnUMxZ6wtQgfK1lzYnbb0zar3HqYZhmANzXmE6UEPbQ4GByLzhpfz/d+xxdBVQZsrHdtiV28KPG2sog== dependencies: ajv "8.11.0" - expo-dev-menu "6.0.24" + expo-dev-menu "6.0.25" expo-manifests "~0.15.8" resolve-from "^5.0.0" @@ -17153,10 +17061,10 @@ expo-dev-menu-interface@1.9.3: resolved "https://registry.yarnpkg.com/expo-dev-menu-interface/-/expo-dev-menu-interface-1.9.3.tgz#5dc618e498b286a50a9272a8bc71969b6db54e23" integrity sha512-KY/dWTBE1l47i9V366JN5rC6YIdOc9hz8yAmZzkl5DrPia5l3M2WIjtnpHC9zUkNjiSiG2urYoOAq4H/uLdmyg== -expo-dev-menu@6.0.24: - version "6.0.24" - resolved "https://registry.yarnpkg.com/expo-dev-menu/-/expo-dev-menu-6.0.24.tgz#eee92f52146280a7d7a16f3eec609902145d7d07" - integrity sha512-1oL11tZnzKL/8ezks9TyDsh5OUfvKQMlHRx+kMcYlw3hgiuYK4KeKZtI6eIk+upQHHT/TKkgIbg3MpcqXrPOyQ== +expo-dev-menu@6.0.25: + version "6.0.25" + resolved "https://registry.yarnpkg.com/expo-dev-menu/-/expo-dev-menu-6.0.25.tgz#72b4607b33d0d6a3823561b1dfe1759a02a86e4a" + integrity sha512-K2m4z/I+CPWbMtHlDzU68lHaQs52De0v5gbsjAmA5ig8FrYh4MKZvPxSVANaiKENzgmtglu8qaFh7ua9Gt2TfA== dependencies: expo-dev-menu-interface "1.9.3" @@ -17168,9 +17076,9 @@ expo-file-system@~18.0.7: web-streams-polyfill "^3.3.2" expo-font@~13.0.3: - version "13.0.3" - resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-13.0.3.tgz#7660ec4e3f5df0782bfa563fea7170c7ce2865ab" - integrity sha512-9IdYz+A+b3KvuCYP7DUUXF4VMZjPU+IsvAnLSVJ2TfP6zUD2JjZFx3jeo/cxWRkYk/aLj5+53Te7elTAScNl4Q== + version "13.0.4" + resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-13.0.4.tgz#c60771446598ddfa98ac1d25244c916a089a99c9" + integrity sha512-eAP5hyBgC8gafFtprsz0HMaB795qZfgJWqTmU0NfbSin1wUuVySFMEPMOrTkTgmazU73v4Cb4x7p86jY1XXYUw== dependencies: fontfaceobserver "^2.1.0" @@ -17180,9 +17088,9 @@ expo-json-utils@~0.14.0: integrity sha512-xjGfK9dL0B1wLnOqNkX0jM9p48Y0I5xEPzHude28LY67UmamUyAACkqhZGaPClyPNfdzczk7Ej6WaRMT3HfXvw== expo-keep-awake@~14.0.2: - version "14.0.2" - resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-14.0.2.tgz#124a729df43c87994631f51d5b1b5093d58e6c80" - integrity sha512-71XAMnoWjKZrN8J7Q3+u0l9Ytp4OfhNAYz8BCWF1/9aFUw09J3I7Z5DuI3MUsVMa/KWi+XhG+eDUFP8cVA19Uw== + version "14.0.3" + resolved "https://registry.yarnpkg.com/expo-keep-awake/-/expo-keep-awake-14.0.3.tgz#74c91b68effdb6969bc1e8371621aad90386cfbf" + integrity sha512-6Jh94G6NvTZfuLnm2vwIpKe3GdOiVBuISl7FI8GqN0/9UOg9E0WXXp5cDcfAG8bn80RfgLJS8P7EPUGTZyOvhg== expo-manifests@~0.15.8: version "0.15.8" @@ -18860,6 +18768,14 @@ html-webpack-plugin@^5.5.0: pretty-error "^4.0.0" tapable "^2.0.0" +html2canvas@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/html2canvas/-/html2canvas-1.4.1.tgz#7cef1888311b5011d507794a066041b14669a543" + integrity sha512-fPU6BHNpsyIhr8yyMpTLLxAbkaK8ArIBcmZIRiBLiDhjeqvXolaEmDGmELFuX9I4xDcaKKcJl+TKZLqruBbmWA== + dependencies: + css-line-break "^2.1.0" + text-segmentation "^1.0.3" + htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-6.1.0.tgz#c4d762b6c3371a05dbe65e94ae43a9f845fb8fb7" @@ -24676,9 +24592,9 @@ react-native-gesture-handler@^1.10.3: prop-types "^15.7.2" react-native-get-random-values@^1.8.0: - version "1.8.0" - resolved "https://registry.yarnpkg.com/react-native-get-random-values/-/react-native-get-random-values-1.8.0.tgz#1cb4bd4bd3966a356e59697b8f372999fe97cb16" - integrity sha512-H/zghhun0T+UIJLmig3+ZuBCvF66rdbiWUfRSNS6kv5oDSpa1ZiVyvRWtuPesQpT8dXj+Bv7WJRQOUP+5TB1sA== + version "1.11.0" + resolved "https://registry.yarnpkg.com/react-native-get-random-values/-/react-native-get-random-values-1.11.0.tgz#1ca70d1271f4b08af92958803b89dccbda78728d" + integrity sha512-4BTbDbRmS7iPdhYLRcz3PGFIpFJBwNZg9g42iwa2P6FOv9vZj/xJc678RZXnLNZzd0qd7Q3CCF6Yd+CU2eoXKQ== dependencies: fast-base64-decode "^1.0.0" @@ -24712,10 +24628,10 @@ react-native-iphone-x-helper@^1.0.3, react-native-iphone-x-helper@^1.3.0: resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz#20c603e9a0e765fd6f97396638bdeb0e5a60b010" integrity sha512-HOf0jzRnq2/aFUcdCJ9w9JGzN3gdEg0zFE4FyYlp4jtidqU03D5X7ZegGKfT1EWteR0gPBGp9ye5T5FvSWi9Yg== -react-native-is-edge-to-edge@1.1.6: - version "1.1.6" - resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.6.tgz#69ec13f70d76e9245e275eed4140d0873a78f902" - integrity sha512-1pHnFTlBahins6UAajXUqeCOHew9l9C2C8tErnpGC3IyLJzvxD+TpYAixnCbrVS52f7+NvMttbiSI290XfwN0w== +react-native-is-edge-to-edge@1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/react-native-is-edge-to-edge/-/react-native-is-edge-to-edge-1.1.7.tgz#28947688f9fafd584e73a4f935ea9603bd9b1939" + integrity sha512-EH6i7E8epJGIcu7KpfXYXiV2JFIYITtq+rVS8uEb+92naMRBdxhTuS8Wn2Q7j9sqyO0B+Xbaaf9VdipIAmGW4w== react-native-jazzicon@^0.1.2: version "0.1.2" @@ -24796,9 +24712,9 @@ react-native-os@^1.2.6: integrity sha512-OlT+xQAcvkcnf7imgXiu+myMkqDt4xw2bP5SlVo19hEn5XHBkPMLX7dk3sSGxxncH/ToMDsf1KLyrPabNVtadA== react-native-pager-view@^6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.7.0.tgz#88f2520e85f07ce55f3f56c57d6637249a215160" - integrity sha512-sutxKiMqBuQrEyt4mLaLNzy8taIC7IuYpxfcwQBXfSYBSSpAa0qE9G1FXlP/iXqTSlFgBXyK7BESsl9umOjECQ== + version "6.7.1" + resolved "https://registry.yarnpkg.com/react-native-pager-view/-/react-native-pager-view-6.7.1.tgz#60d52dedbcc92ee7037a13287ebeed5f74e49df7" + integrity sha512-cBSr6xw4g5N7Kd3VGWcf+kmaH7iBWb0DXAf2bVo3bXkzBcBbTOmYSvc0LVLHhUPW8nEq5WjT9LCIYAzgF++EXw== react-native-performance@^5.1.2: version "5.1.2" @@ -24852,9 +24768,9 @@ react-native-randombytes@^3.5.3: sjcl "^1.0.3" react-native-reanimated@^3.17.2: - version "3.17.2" - resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.17.2.tgz#92a5d8acfe77185d41c29140fc0b706d8160441b" - integrity sha512-8z4o8/qZRM02oI3qzVh48417/AXDx+aKl95X8qn+vqQx+s7Z1sGI8GPah645vYDB/DrPDRkoJOp0tAhrJdXs9w== + version "3.17.5" + resolved "https://registry.yarnpkg.com/react-native-reanimated/-/react-native-reanimated-3.17.5.tgz#09ebe3c9e3379c5c0c588b7ab30c131ea29b60f0" + integrity sha512-SxBK7wQfJ4UoWoJqQnmIC7ZjuNgVb9rcY5Xc67upXAFKftWg0rnkknTw6vgwnjRcvYThrjzUVti66XoZdDJGtw== dependencies: "@babel/plugin-transform-arrow-functions" "^7.0.0-0" "@babel/plugin-transform-class-properties" "^7.0.0-0" @@ -24867,7 +24783,7 @@ react-native-reanimated@^3.17.2: "@babel/preset-typescript" "^7.16.7" convert-source-map "^2.0.0" invariant "^2.2.4" - react-native-is-edge-to-edge "1.1.6" + react-native-is-edge-to-edge "1.1.7" react-native-render-html@^6.3.4: version "6.3.4" @@ -24980,9 +24896,9 @@ react-native-svg-transformer@^1.0.0: path-dirname "^1.0.2" react-native-svg@^15.11.1: - version "15.11.1" - resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-15.11.1.tgz#8152459a7a4d40b02e9ac8270f9b0692b3216715" - integrity sha512-Qmwx/yJKt+AHUr4zjxx/Q69qwKtRfr1+uIfFMQoq3WFRhqU76aL9db1DyvPiY632DAsVGba1pHf92OZPkpjrdQ== + version "15.11.2" + resolved "https://registry.yarnpkg.com/react-native-svg/-/react-native-svg-15.11.2.tgz#7540e8e1eabc4dcd3b1e35ada5a1d9f1b96d37c4" + integrity sha512-+YfF72IbWQUKzCIydlijV1fLuBsQNGMT6Da2kFlo1sh+LE3BIm/2Q7AR1zAAR6L0BFLi1WaQPLfFUC9bNZpOmw== dependencies: css-select "^5.1.0" css-tree "^1.1.3" @@ -25046,9 +24962,11 @@ react-native-video@^6.10.1: integrity sha512-sXTD3yvsOi3MWjdI5uZFxOpiFcYzHT6aUpJtY2hIkffFt6QefL2zJAANzTboFTyt18J1LfL0cSQSLoJzXDFedQ== react-native-view-shot@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/react-native-view-shot/-/react-native-view-shot-3.1.2.tgz#8c8e84c67a4bc8b603e697dbbd59dbc9b4f84825" - integrity sha512-9u9fPtp6a52UMoZ/UCPrCjKZk8tnkI9To0Eh6yYnLKFEGkRZ7Chm6DqwDJbYJHeZrheCCopaD5oEOnRqhF4L2Q== + version "3.8.0" + resolved "https://registry.yarnpkg.com/react-native-view-shot/-/react-native-view-shot-3.8.0.tgz#1aa1905f0e79428ca32bf80c16fd4abc719c600b" + integrity sha512-4cU8SOhMn3YQIrskh+5Q8VvVRxQOu8/s1M9NAL4z5BY1Rm0HXMWkQJ4N0XsZ42+Yca+y86ISF3LC5qdLPvPuiA== + dependencies: + html2canvas "^1.4.1" react-native-webview-invoke@^0.6.2: version "0.6.2" @@ -26754,13 +26672,6 @@ split@0.3: dependencies: through "2" -split@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/split/-/split-1.0.1.tgz#605bd9be303aa59fb35f9229fbea0ddec9ea07d9" - integrity sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg== - dependencies: - through "2" - sprintf-js@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.3.tgz#4914b903a2f8b685d17fdf78a70e917e872e444a" @@ -27218,11 +27129,6 @@ sucrase@3.35.0: pirates "^4.0.1" ts-interface-checker "^0.1.9" -sudo-prompt@9.1.1: - version "9.1.1" - resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0" - integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA== - sudo-prompt@^8.2.0: version "8.2.5" resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-8.2.5.tgz#cc5ef3769a134bb94b24a631cc09628d4d53603e" @@ -27539,6 +27445,13 @@ text-hex@1.0.x: resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== +text-segmentation@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/text-segmentation/-/text-segmentation-1.0.3.tgz#52a388159efffe746b24a63ba311b6ac9f2d7943" + integrity sha512-iOiPUo/BGnZ6+54OsWxZidGCsdU8YbE4PSpdPinp7DeMtUJNJBoJ/ouUSTJjHkh1KntHaltHl/gDs2FC4i5+Nw== + dependencies: + utrie "^1.0.2" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -28354,6 +28267,13 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= +utrie@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/utrie/-/utrie-1.0.2.tgz#d42fe44de9bc0119c25de7f564a6ed1b2c87a645" + integrity sha512-1MLa5ouZiOmQzUbjbu9VmjLzn1QLXBhwpUa7kdLUQK+KQ5KA9I1vk5U4YHe/X2Ch7PYnJfWuWT+VbuxbGwljhw== + dependencies: + base64-arraybuffer "^1.0.2" + uuid@10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-10.0.0.tgz#5a95aa454e6e002725c79055fd42aaba30ca6294" From 213472179ebbbf598e2038a9389651fcf27a0495 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 16:39:23 -0700 Subject: [PATCH 02/19] Fix dedupe --- yarn.lock | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yarn.lock b/yarn.lock index 867bffbfae7d..62105e8f6a3b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2752,7 +2752,7 @@ temp-dir "~2.0.0" unique-string "~2.0.0" -"@expo/json-file@^9.0.1", "@expo/json-file@^9.1.4": +"@expo/json-file@^9.0.1", "@expo/json-file@^9.0.2", "@expo/json-file@^9.1.4": version "9.1.4" resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.1.4.tgz#e719d092c08afb3234643f9285e57c6a24989327" integrity sha512-7Bv86X27fPERGhw8aJEZvRcH9sk+9BenDnEmrI3ZpywKodYSBgc8lX9Y32faNVQ/p0YbDK9zdJ0BfAKNAOyi0A== @@ -2760,15 +2760,6 @@ "@babel/code-frame" "~7.10.4" json5 "^2.2.3" -"@expo/json-file@^9.0.2", "@expo/json-file@~9.0.1", "@expo/json-file@~9.0.2": - version "9.0.2" - resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.0.2.tgz#ec508c2ad17490e0c664c9d7e2ae0ce65915d3ed" - integrity sha512-yAznIUrybOIWp3Uax7yRflB0xsEpvIwIEqIjao9SGi2Gaa+N0OamWfe0fnXBSWF+2zzF4VvqwT4W5zwelchfgw== - dependencies: - "@babel/code-frame" "~7.10.4" - json5 "^2.2.3" - write-file-atomic "^2.3.0" - "@expo/json-file@~8.2.37": version "8.2.37" resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-8.2.37.tgz#9c02d3b42134907c69cc0a027b18671b69344049" @@ -2778,6 +2769,15 @@ json5 "^2.2.2" write-file-atomic "^2.3.0" +"@expo/json-file@~9.0.1", "@expo/json-file@~9.0.2": + version "9.0.2" + resolved "https://registry.yarnpkg.com/@expo/json-file/-/json-file-9.0.2.tgz#ec508c2ad17490e0c664c9d7e2ae0ce65915d3ed" + integrity sha512-yAznIUrybOIWp3Uax7yRflB0xsEpvIwIEqIjao9SGi2Gaa+N0OamWfe0fnXBSWF+2zzF4VvqwT4W5zwelchfgw== + dependencies: + "@babel/code-frame" "~7.10.4" + json5 "^2.2.3" + write-file-atomic "^2.3.0" + "@expo/metro-config@0.19.9": version "0.19.9" resolved "https://registry.yarnpkg.com/@expo/metro-config/-/metro-config-0.19.9.tgz#f020a2523cecf90e4f2a833386a88e07f6d004f8" From 71da8bba95737eadd3b434ee06a95ce06e2e7c51 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 17:03:55 -0700 Subject: [PATCH 03/19] Fix Sentry types --- app/util/trace.test.ts | 15 ++++++++------- app/util/trace.ts | 14 +++----------- package.json | 1 - yarn.lock | 12 ------------ 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/app/util/trace.test.ts b/app/util/trace.test.ts index 5e64b61a5d62..bfab7d599b5b 100644 --- a/app/util/trace.test.ts +++ b/app/util/trace.test.ts @@ -5,8 +5,7 @@ import { startSpanManual, withScope, } from '@sentry/react-native'; - -import { Span } from '@sentry/types'; +import type { Span } from '@sentry/core'; import { endTrace, trace, TraceName, TRACES_CLEANUP_INTERVAL } from './trace'; jest.mock('@sentry/react-native', () => ({ @@ -19,8 +18,10 @@ jest.mock('@sentry/react-native', () => ({ const NAME_MOCK = TraceName.Middleware; const ID_MOCK = 'testId'; const PARENT_CONTEXT_MOCK = { - spanId: 'parentSpanId', -} as Span; + spanContext: () => ({ + spanId: 'parentSpanId', + }), +}; const TAGS_MOCK = { tag1: 'value1', @@ -90,7 +91,7 @@ describe('Trace', () => { expect(startSpanMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanId, + parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, attributes: DATA_MOCK, op: 'custom', }, @@ -120,7 +121,7 @@ describe('Trace', () => { expect(startSpanManualMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanId, + parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, attributes: DATA_MOCK, op: 'custom', }, @@ -151,7 +152,7 @@ describe('Trace', () => { expect(startSpanManualMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanId, + parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, attributes: DATA_MOCK, op: 'custom', startTime: 123, diff --git a/app/util/trace.ts b/app/util/trace.ts index 1236f12bd635..a6cca4684c41 100644 --- a/app/util/trace.ts +++ b/app/util/trace.ts @@ -5,8 +5,8 @@ import { setMeasurement, Scope, } from '@sentry/react-native'; +import type { StartSpanOptions, Span } from '@sentry/core'; import performance from 'react-native-performance'; -import type { Span, StartSpanOptions, MeasurementUnit } from '@sentry/types'; import { createModuleLogger, createProjectLogger } from '@metamask/utils'; // Cannot create this 'sentry' logger in Sentry util file because of circular dependency @@ -285,7 +285,7 @@ function startSpan( op: op || OP_DEFAULT, // This needs to be parentSpan once we have the withIsolatedScope implementation in place in the Sentry SDK for React Native // Reference PR that updates @sentry/react-native: https://github.com/getsentry/sentry-react-native/pull/3895 - parentSpanId: parentSpan?.spanId, + parentSpan, startTime, }; @@ -336,7 +336,7 @@ function initSpan(_span: Span, request: TraceRequest) { for (const [key, value] of Object.entries(tags)) { if (typeof value === 'number') { - sentrySetMeasurement(key, value, 'none'); + setMeasurement(key, value, 'none'); } } } @@ -373,11 +373,3 @@ function tryCatchMaybePromise( return undefined; } - -function sentrySetMeasurement( - key: string, - value: number, - unit: MeasurementUnit, -) { - setMeasurement(key, value, unit); -} diff --git a/package.json b/package.json index 143a7f43e20b..733de041b368 100644 --- a/package.json +++ b/package.json @@ -427,7 +427,6 @@ "@open-rpc/test-coverage": "^2.2.2", "@react-native/metro-config": "0.76.9", "@rpii/wdio-html-reporter": "^7.7.1", - "@sentry/types": "^9.15.0", "@storybook/addon-controls": "^7.5.1", "@storybook/addon-ondevice-controls": "^6.5.6", "@storybook/builder-webpack5": "^7.5.1", diff --git a/yarn.lock b/yarn.lock index 62105e8f6a3b..4a1034ec13b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7705,11 +7705,6 @@ resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.54.0.tgz#a2ebec965cadcb6de89e116689feeef79d5862a6" integrity sha512-03bWf+D1j28unOocY/5FDB6bUHtYlm6m6ollVejhg45ZmK9iPjdtxNWbrLsjT1WRym0Tjzowu+A3p+eebYEv0Q== -"@sentry/core@9.15.0": - version "9.15.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-9.15.0.tgz#590f16a15596ce01db49d9d80b31cb18048ca9a4" - integrity sha512-lBmo3bzzaYUesdzc2H5K3fajfXyUNuj5koqyFoCAI8rnt9CBl7SUc/P07+E5eipF8mxgiU3QtkI7ALzRQN8pqQ== - "@sentry/integrations@6.3.1": version "6.3.1" resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.3.1.tgz#8bd4c05a83c5fe8ece6cb59a6e31e1e632a14af8" @@ -7754,13 +7749,6 @@ dependencies: "@sentry/core" "8.54.0" -"@sentry/types@^9.15.0": - version "9.15.0" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-9.15.0.tgz#dd1342be83879d2c6cddbb4fd5b8ca6128caba4d" - integrity sha512-txQhb39vySyfiOo5w132lGylip0hyFZU5q4hgdILm2DbDVtvQN+MrXS1ocjlw9VyxhkT6Q/6W/q0pwkMRv6rIg== - dependencies: - "@sentry/core" "9.15.0" - "@sentry/utils@6.3.1": version "6.3.1" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.3.1.tgz#6d8e691139b5b49d8c655ad1dcaf2cb3ff0d0b03" From d0e436e4c78bcbca6d24e728a10e5901c6373772 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 20:40:51 -0700 Subject: [PATCH 04/19] Enforce better stack trace with captureException --- .../components/BlockaidBanner/BlockaidBanner.tsx | 9 +++++++-- patches/@sentry+core+8.54.0.patch | 16 ++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 patches/@sentry+core+8.54.0.patch diff --git a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx index f9aced74a5b4..18a7da9c9f74 100644 --- a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx +++ b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx @@ -124,14 +124,19 @@ const BlockaidBanner = (bannerProps: BlockaidBannerProps) => { severity={BannerAlertSeverity.Warning} title={title} description={description} - testID={ConfirmationTopSheetSelectorsIDs.SECURITY_ALERT_RESPONSE_FAILED_BANNER} + testID={ + ConfirmationTopSheetSelectorsIDs.SECURITY_ALERT_RESPONSE_FAILED_BANNER + } /> ); } if (!REASON_DESCRIPTION_I18N_KEY_MAP[reason]) { - captureException(`BlockaidBannerAlert: Unidentified reason '${reason}'`); + const unidentifiedReasonError = new Error( + `BlockaidBannerAlert: Unidentified reason '${reason}'`, + ); + captureException(unidentifiedReasonError); } const renderDetails = () => diff --git a/patches/@sentry+core+8.54.0.patch b/patches/@sentry+core+8.54.0.patch new file mode 100644 index 000000000000..98903859eded --- /dev/null +++ b/patches/@sentry+core+8.54.0.patch @@ -0,0 +1,16 @@ +diff --git a/node_modules/@sentry/core/build/types/exports.d.ts b/node_modules/@sentry/core/build/types/exports.d.ts +index 5402c50..79a162b 100644 +--- a/node_modules/@sentry/core/build/types/exports.d.ts ++++ b/node_modules/@sentry/core/build/types/exports.d.ts +@@ -6,8 +6,10 @@ import type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent'; + * @param exception The exception to capture. + * @param hint Optional additional data to attach to the Sentry event. + * @returns the id of the captured Sentry event. ++ * ++ * Patch to enforce better stack tracing using Error - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors + */ +-export declare function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string; ++export declare function captureException(exception: Error, hint?: ExclusiveEventHintOrCaptureContext): string; + /** + * Captures a message event and sends it to Sentry. + * From f952bd614ef8558bde8161ba79e85e248a906ecd Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 21:00:34 -0700 Subject: [PATCH 05/19] Fix dep check --- app/util/trace.test.ts | 8 ++++---- package.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/util/trace.test.ts b/app/util/trace.test.ts index bfab7d599b5b..c938d903f91b 100644 --- a/app/util/trace.test.ts +++ b/app/util/trace.test.ts @@ -21,7 +21,7 @@ const PARENT_CONTEXT_MOCK = { spanContext: () => ({ spanId: 'parentSpanId', }), -}; +} as Span; const TAGS_MOCK = { tag1: 'value1', @@ -91,7 +91,7 @@ describe('Trace', () => { expect(startSpanMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, + parentSpan: PARENT_CONTEXT_MOCK, attributes: DATA_MOCK, op: 'custom', }, @@ -121,7 +121,7 @@ describe('Trace', () => { expect(startSpanManualMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, + parentSpan: PARENT_CONTEXT_MOCK, attributes: DATA_MOCK, op: 'custom', }, @@ -152,7 +152,7 @@ describe('Trace', () => { expect(startSpanManualMock).toHaveBeenCalledWith( { name: NAME_MOCK, - parentSpanId: PARENT_CONTEXT_MOCK.spanContext?.()?.spanId, + parentSpan: PARENT_CONTEXT_MOCK, attributes: DATA_MOCK, op: 'custom', startTime: 123, diff --git a/package.json b/package.json index 733de041b368..255f8cc4ff39 100644 --- a/package.json +++ b/package.json @@ -427,6 +427,7 @@ "@open-rpc/test-coverage": "^2.2.2", "@react-native/metro-config": "0.76.9", "@rpii/wdio-html-reporter": "^7.7.1", + "@sentry/core": "8.54.0", "@storybook/addon-controls": "^7.5.1", "@storybook/addon-ondevice-controls": "^6.5.6", "@storybook/builder-webpack5": "^7.5.1", From 4689ee5545920e303c0dfc8e4f496bf8245311c6 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Wed, 30 Apr 2025 21:31:50 -0700 Subject: [PATCH 06/19] Pass errors to capture exception --- app/store/migrations/035.ts | 4 +++- app/store/migrations/049.ts | 4 +++- app/store/migrations/050.ts | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/store/migrations/035.ts b/app/store/migrations/035.ts index deb17288db30..39a92e56413c 100644 --- a/app/store/migrations/035.ts +++ b/app/store/migrations/035.ts @@ -41,7 +41,9 @@ export default async function migrate(stateAsync: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { captureException( - `Migration 35: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, + new Error( + `Migration 35: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, + ), ); } diff --git a/app/store/migrations/049.ts b/app/store/migrations/049.ts index cc20ebd750be..4c910b5b81bc 100644 --- a/app/store/migrations/049.ts +++ b/app/store/migrations/049.ts @@ -16,7 +16,9 @@ export default async function migrate(state: unknown) { await AsyncStorage.removeItem(key); } catch (error) { captureException( - `Failed to migrate key "${key}" from AsyncStorage to MMKV! Error: ${error}`, + new Error( + `Failed to migrate key "${key}" from AsyncStorage to MMKV! Error: ${error}`, + ), ); } } diff --git a/app/store/migrations/050.ts b/app/store/migrations/050.ts index 70f24c1b885b..35910871aabd 100644 --- a/app/store/migrations/050.ts +++ b/app/store/migrations/050.ts @@ -19,7 +19,9 @@ export default async function migrate(state: unknown) { await DefaultPreference.clear(key); } catch (error) { captureException( - `Migration 50: Failed to migrate key "${key}" from DefaultPreference to MMKV! Error: ${error}`, + new Error( + `Migration 50: Failed to migrate key "${key}" from DefaultPreference to MMKV! Error: ${error}`, + ), ); } } From eb5036cf79662797fc74278d075e4618aca3c866 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 13:46:04 -0700 Subject: [PATCH 07/19] Replace withScope with withIsolationScope --- app/util/trace.test.ts | 20 +++++++++++--------- app/util/trace.ts | 15 ++++++++------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/app/util/trace.test.ts b/app/util/trace.test.ts index c938d903f91b..38a661132489 100644 --- a/app/util/trace.test.ts +++ b/app/util/trace.test.ts @@ -1,20 +1,21 @@ import { - Scope, setMeasurement, startSpan, startSpanManual, - withScope, } from '@sentry/react-native'; -import type { Span } from '@sentry/core'; +import { Scope, type Span, withIsolationScope } from '@sentry/core'; import { endTrace, trace, TraceName, TRACES_CLEANUP_INTERVAL } from './trace'; jest.mock('@sentry/react-native', () => ({ - withScope: jest.fn(), startSpan: jest.fn(), startSpanManual: jest.fn(), setMeasurement: jest.fn(), })); +jest.mock('@sentry/core', () => ({ + withIsolationScope: jest.fn(), +})); + const NAME_MOCK = TraceName.Middleware; const ID_MOCK = 'testId'; const PARENT_CONTEXT_MOCK = { @@ -38,7 +39,8 @@ const DATA_MOCK = { describe('Trace', () => { const startSpanMock = jest.mocked(startSpan); const startSpanManualMock = jest.mocked(startSpanManual); - const withScopeMock = jest.mocked(withScope); + // mockImplementation doesn't choose the correct overload, so we ignore the types by casting to jest.Mock + const withIsolationScopeMock = jest.mocked(withIsolationScope) as jest.Mock; const setMeasurementMock = jest.mocked(setMeasurement); const setTagMock = jest.fn(); @@ -53,7 +55,7 @@ describe('Trace', () => { }), ); - withScopeMock.mockImplementation((fn: (arg: Scope) => unknown) => + withIsolationScopeMock.mockImplementation((fn: (arg: Scope) => unknown) => fn({ setTag: setTagMock } as unknown as Scope), ); }); @@ -85,7 +87,7 @@ describe('Trace', () => { () => true, ); - expect(withScopeMock).toHaveBeenCalledTimes(1); + expect(withIsolationScopeMock).toHaveBeenCalledTimes(1); expect(startSpanMock).toHaveBeenCalledTimes(1); expect(startSpanMock).toHaveBeenCalledWith( @@ -115,7 +117,7 @@ describe('Trace', () => { parentContext: PARENT_CONTEXT_MOCK, }); - expect(withScopeMock).toHaveBeenCalledTimes(1); + expect(withIsolationScopeMock).toHaveBeenCalledTimes(1); expect(startSpanManualMock).toHaveBeenCalledTimes(1); expect(startSpanManualMock).toHaveBeenCalledWith( @@ -146,7 +148,7 @@ describe('Trace', () => { startTime: 123, }); - expect(withScopeMock).toHaveBeenCalledTimes(1); + expect(withIsolationScopeMock).toHaveBeenCalledTimes(1); expect(startSpanManualMock).toHaveBeenCalledTimes(1); expect(startSpanManualMock).toHaveBeenCalledWith( diff --git a/app/util/trace.ts b/app/util/trace.ts index a6cca4684c41..ac0e77814d16 100644 --- a/app/util/trace.ts +++ b/app/util/trace.ts @@ -1,11 +1,14 @@ import { startSpan as sentryStartSpan, startSpanManual, - withScope, setMeasurement, Scope, } from '@sentry/react-native'; -import type { StartSpanOptions, Span } from '@sentry/core'; +import { + type StartSpanOptions, + type Span, + withIsolationScope, +} from '@sentry/core'; import performance from 'react-native-performance'; import { createModuleLogger, createProjectLogger } from '@metamask/utils'; @@ -283,14 +286,12 @@ function startSpan( attributes, name, op: op || OP_DEFAULT, - // This needs to be parentSpan once we have the withIsolatedScope implementation in place in the Sentry SDK for React Native - // Reference PR that updates @sentry/react-native: https://github.com/getsentry/sentry-react-native/pull/3895 parentSpan, startTime, }; - return withScope((scope) => { - initScope(scope, request); + return withIsolationScope((scope) => { + setScopeTags(scope, request); return callback(spanOptions); }) as T; @@ -314,7 +315,7 @@ function getTraceKey(request: TraceRequest) { * @param scope - The Sentry scope to initialise. * @param request - The trace request. */ -function initScope(scope: Scope, request: TraceRequest) { +function setScopeTags(scope: Scope, request: TraceRequest) { const tags = request.tags ?? {}; for (const [key, value] of Object.entries(tags)) { From 5d09c13425a0f6270b60d6904c18a554272c53b1 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 14:24:31 -0700 Subject: [PATCH 08/19] Use v5 tracePropogationTargets and replace integrations with functions from @sentry/browser --- app/util/sentry/utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/util/sentry/utils.js b/app/util/sentry/utils.js index 9218e72dc540..35cd854074f0 100644 --- a/app/util/sentry/utils.js +++ b/app/util/sentry/utils.js @@ -1,6 +1,6 @@ /* eslint-disable import/no-namespace */ import * as Sentry from '@sentry/react-native'; -import { Dedupe, ExtraErrorData } from '@sentry/integrations'; +import { dedupeIntegration, extraErrorDataIntegration } from '@sentry/browser'; import extractEthJsErrorMessage from '../extractEthJsErrorMessage'; import StorageWrapper from '../../store/storage-wrapper'; import { regex } from '../regex'; @@ -549,7 +549,7 @@ export function setupSentry() { const init = async () => { const metricsOptIn = await StorageWrapper.getItem(METRICS_OPT_IN); - const integrations = [new Dedupe(), new ExtraErrorData()]; + const integrations = [dedupeIntegration(), extraErrorDataIntegration()]; const environment = deriveSentryEnvironment( __DEV__, METAMASK_ENVIRONMENT, @@ -568,6 +568,8 @@ export function setupSentry() { beforeBreadcrumb: (breadcrumb) => rewriteBreadcrumb(breadcrumb), beforeSendTransaction: (event) => excludeEvents(event), enabled: metricsOptIn === AGREED, + // Use tracePropagationTargets from v5 SDK as default + tracePropagationTargets: ['localhost', /^\/(?!\/)/], }); }; init(); From 51819d215e55c222a2020ef4b0ca668360b16c7b Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 14:25:04 -0700 Subject: [PATCH 09/19] Update @sentry/react-native version and add core + browser --- package.json | 8 +- yarn.lock | 206 +++++++++++++++++++++++++++------------------------ 2 files changed, 112 insertions(+), 102 deletions(-) diff --git a/package.json b/package.json index 255f8cc4ff39..6ec9fa8a4eb6 100644 --- a/package.json +++ b/package.json @@ -250,11 +250,12 @@ "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "@reduxjs/toolkit": "^1.9.7", - "@segment/analytics-react-native": "^2.20.3", "@reown/walletkit": "^1.2.3", + "@segment/analytics-react-native": "^2.20.3", "@segment/sovran-react-native": "^1.0.4", - "@sentry/integrations": "6.3.1", - "@sentry/react-native": "~6.10.0", + "@sentry/react-native": "^6.10.0", + "@sentry/browser": "^8.54.0", + "@sentry/core": "^8.54.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", "@tradle/react-native-http": "2.0.1", @@ -427,7 +428,6 @@ "@open-rpc/test-coverage": "^2.2.2", "@react-native/metro-config": "0.76.9", "@rpii/wdio-html-reporter": "^7.7.1", - "@sentry/core": "8.54.0", "@storybook/addon-controls": "^7.5.1", "@storybook/addon-ondevice-controls": "^6.5.6", "@storybook/builder-webpack5": "^7.5.1", diff --git a/yarn.lock b/yarn.lock index 4a1034ec13b1..7ea2c4e07953 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7607,6 +7607,13 @@ dependencies: "@sentry/core" "8.54.0" +"@sentry-internal/browser-utils@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.55.0.tgz#d89bae423edd29c39f01285c8e2d59ce9289d9a6" + integrity sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw== + dependencies: + "@sentry/core" "8.55.0" + "@sentry-internal/feedback@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.54.0.tgz#52c3a63aa5b520eca7acfa1376621e8441984126" @@ -7614,6 +7621,13 @@ dependencies: "@sentry/core" "8.54.0" +"@sentry-internal/feedback@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.55.0.tgz#170b8e96a36ce6f71f53daad680f1a0c98381314" + integrity sha512-cP3BD/Q6pquVQ+YL+rwCnorKuTXiS9KXW8HNKu4nmmBAyf7urjs+F6Hr1k9MXP5yQ8W3yK7jRWd09Yu6DHWOiw== + dependencies: + "@sentry/core" "8.55.0" + "@sentry-internal/replay-canvas@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.54.0.tgz#e57a3893db2bb0ea7ad9dc2a804bb035142fe3ba" @@ -7622,6 +7636,14 @@ "@sentry-internal/replay" "8.54.0" "@sentry/core" "8.54.0" +"@sentry-internal/replay-canvas@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.55.0.tgz#e65430207a2f18e4a07c25c669ec758d11282aaf" + integrity sha512-nIkfgRWk1091zHdu4NbocQsxZF1rv1f7bbp3tTIlZYbrH62XVZosx5iHAuZG0Zc48AETLE7K4AX9VGjvQj8i9w== + dependencies: + "@sentry-internal/replay" "8.55.0" + "@sentry/core" "8.55.0" + "@sentry-internal/replay@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.54.0.tgz#b92990a51ffbe8d92998ff8188db9e3a6f9d1e18" @@ -7630,10 +7652,18 @@ "@sentry-internal/browser-utils" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/babel-plugin-component-annotate@3.2.2": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.2.2.tgz#0c5f26e417b8f524924fa4531b82ad5603216e90" - integrity sha512-D+SKQ266ra/wo87s9+UI/rKQi3qhGPCR8eSCDe0VJudhjHsqyNU+JJ5lnIGCgmZaWFTXgdBP/gdr1Iz1zqGs4Q== +"@sentry-internal/replay@8.55.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.55.0.tgz#4c00b22cdf58cac5b3e537f8d4f675f2b021f475" + integrity sha512-roCDEGkORwolxBn8xAKedybY+Jlefq3xYmgN2fr3BTnsXjSYOPC7D1/mYqINBat99nDtvgFvNfRcZPiwwZ1hSw== + dependencies: + "@sentry-internal/browser-utils" "8.55.0" + "@sentry/core" "8.55.0" + +"@sentry/babel-plugin-component-annotate@3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.3.1.tgz#baecd89396cbb4659565a4e8efe7f0a71b19262a" + integrity sha512-5GOxGT7lZN+I8A7Vp0rWY+726FDKEw8HnFiebe51rQrMbfGfCu2Aw9uSM0nT9OG6xhV6WvGccIcCszTPs4fUZQ== "@sentry/browser@8.54.0": version "8.54.0" @@ -7646,45 +7676,61 @@ "@sentry-internal/replay-canvas" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/cli-darwin@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.42.4.tgz#029521d3052c644e3bac1c926e53d1e658b8cb28" - integrity sha512-PZV4Y97VDWBR4rIt0HkJfXaBXlebIN2s/FDzC3iHINZE5OG62CDFsnC4/lbGlf2/UZLDaGGIK7mYwSHhTvN+HQ== - -"@sentry/cli-linux-arm64@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.42.4.tgz#b5e2d2399764998e3d661f144aae0c3f3495d1f1" - integrity sha512-Ex8vRnryyzC/9e43daEmEqPS+9uirY/l6Hw2lAvhBblFaL7PTWNx52H+8GnYGd9Zy2H3rWNyBDYfHwnErg38zA== - -"@sentry/cli-linux-arm@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.42.4.tgz#286996c3969a553c07a74a2a67c6d3671e2c79b5" - integrity sha512-lBn0oeeg62h68/4Eo6zbPq99Idz5t0VRV48rEU/WKeM4MtQCvG/iGGQ3lBFW2yNiUBzXZIK9poXLEcgbwmcRVw== - -"@sentry/cli-linux-i686@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.42.4.tgz#03e72598dc37e96a99e4329e20db9e74df277f83" - integrity sha512-IBJg0aHjsLCL4LvcFa3cXIjA+4t5kPqBT9y+PoDu4goIFxYD8zl7mbUdGJutvJafTk8Akf4ss4JJXQBjg019zA== - -"@sentry/cli-linux-x64@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.42.4.tgz#a3bc31a909f61029620e5d2ae0f8d8625ed8982a" - integrity sha512-gXI5OEiOSNiAEz7VCE6AZcAgHJ47mlgal3+NmbE8XcHmFOnyDws9FNie6PJAy8KZjXi3nqoBP9JVAbnmOix3uA== - -"@sentry/cli-win32-i686@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.42.4.tgz#0de663fc574f4bce2057e099c5b76b65f99a3bd6" - integrity sha512-vZuR3UPHKqOMniyrijrrsNwn9usaRysXq78F6WV0cL0ZyPLAmY+KBnTDSFk1Oig2pURnzaTm+RtcZu2fc8mlzg== - -"@sentry/cli-win32-x64@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.42.4.tgz#f572a03084f3b1a4f355c1fbeb1339cb56ad91c9" - integrity sha512-OIBj3uaQ6nAERSm5Dcf8UIhyElEEwMNsZEEppQpN4IKl0mrwb/57AznM23Dvpu6GR8WGbVQUSolt879YZR5E9g== - -"@sentry/cli@2.42.4": - version "2.42.4" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.42.4.tgz#df6ac3e92a60a715b231873433894ed77e601086" - integrity sha512-BoSZDAWJiz/40tu6LuMDkSgwk4xTsq6zwqYoUqLU3vKBR/VsaaQGvu6EWxZXORthfZU2/5Agz0+t220cge6VQw== +"@sentry/browser@^8.54.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.55.0.tgz#9a489e2a54d29c65e6271b4ee594b43679cab7bd" + integrity sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw== + dependencies: + "@sentry-internal/browser-utils" "8.55.0" + "@sentry-internal/feedback" "8.55.0" + "@sentry-internal/replay" "8.55.0" + "@sentry-internal/replay-canvas" "8.55.0" + "@sentry/core" "8.55.0" + +"@sentry/cli-darwin@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.43.1.tgz#356ea4d334a373a87927393f1ff9b047dee99185" + integrity sha512-622g/UyhTi1zC0Nnnbto75gNkExwwjv1cnRA4ERwfPgiOI3UK0/j+m4CcosqrfdTK55pv+SiifOlmvDPZnMIZw== + +"@sentry/cli-linux-arm64@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.43.1.tgz#02918f83d962a9af279dbce0eab6bd2fa57ac033" + integrity sha512-c1P7eZqdDwRlePBSQSgWYUi80W5ywvG/XxZFVecjdHDEYlo2BJTRirqZTqzKzI/Ekk8x5hOxNuBbP+m9FluDMw== + +"@sentry/cli-linux-arm@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.43.1.tgz#e7bf2c71b6f376581b08034f7d410b3492314c52" + integrity sha512-eQKcfqMR9bg8HKR9UCwm8x3lGBMUu1wCQow2BwEX4NbY1GzniSHNH4MBY2ERpOsfCA0LM5xEWQk/QFXexz1Dhw== + +"@sentry/cli-linux-i686@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.43.1.tgz#ae495afe985f2b9738ec8277cf84361d6ead1501" + integrity sha512-VRhzmEOeA/nsQHkf3Jt8mbgZmdbAWURM18Y1uXVRI/mQzZaz6YAZ+IzQ6gANpUk+UfTdf1q0unZSAIOUuu19gA== + +"@sentry/cli-linux-x64@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.43.1.tgz#05a245a995387197f327251674069c553a3f53b6" + integrity sha512-c8G4zdzxzdPOz+tV1LNwUz5UsPNnhEE13kMPesF81liawwznnBsDfeKf6t/87Eem4BgAPdsFlnqnffi4BdqkZQ== + +"@sentry/cli-win32-arm64@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.43.1.tgz#5fdea8285998e6915a0588ebceed87a0afb2a05c" + integrity sha512-K+9td351lzUn51R/oHotyEkq7nzKWBm2ffhVAe4HXNh72MjhyIvonAhQUrGawIjn/aLHO+hq9iNaEXbCu6Hulg== + +"@sentry/cli-win32-i686@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.43.1.tgz#42907778a1352a87ebe7f1de8d098cb82a7a447f" + integrity sha512-Co7kj0o16xcUZRZY+VwMgpdDvOY2xAbR5Xg5NXv73nXdALgGWf+G5bntFz3baNmaSOYWKJjvZT7a+YLwe/DihQ== + +"@sentry/cli-win32-x64@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.43.1.tgz#a26e161e2ce3e3b7e262e4da197c3905b6f291c9" + integrity sha512-uH7l4FXc6s0GoJeriU6kQOYzREqDGB7b16XbTKY+lnhMNvBgP2aaOUQ9yRLbEHeSSg/112SQeolCnF2GwTmoKw== + +"@sentry/cli@2.43.1": + version "2.43.1" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.43.1.tgz#8b34d2b24d661aef55395a40ac72413a813a626d" + integrity sha512-5jg8cy4LlPnmgI6FkxClDRB5hFWzmlq7VZqj5o6Zdm5KRywzCn2s18GXyC1LPf6MFHw3AZ/K2h5pUZmJdWUBFQ== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -7692,37 +7738,33 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.42.4" - "@sentry/cli-linux-arm" "2.42.4" - "@sentry/cli-linux-arm64" "2.42.4" - "@sentry/cli-linux-i686" "2.42.4" - "@sentry/cli-linux-x64" "2.42.4" - "@sentry/cli-win32-i686" "2.42.4" - "@sentry/cli-win32-x64" "2.42.4" + "@sentry/cli-darwin" "2.43.1" + "@sentry/cli-linux-arm" "2.43.1" + "@sentry/cli-linux-arm64" "2.43.1" + "@sentry/cli-linux-i686" "2.43.1" + "@sentry/cli-linux-x64" "2.43.1" + "@sentry/cli-win32-arm64" "2.43.1" + "@sentry/cli-win32-i686" "2.43.1" + "@sentry/cli-win32-x64" "2.43.1" "@sentry/core@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.54.0.tgz#a2ebec965cadcb6de89e116689feeef79d5862a6" integrity sha512-03bWf+D1j28unOocY/5FDB6bUHtYlm6m6ollVejhg45ZmK9iPjdtxNWbrLsjT1WRym0Tjzowu+A3p+eebYEv0Q== -"@sentry/integrations@6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-6.3.1.tgz#8bd4c05a83c5fe8ece6cb59a6e31e1e632a14af8" - integrity sha512-fB0+CmU2L2VJ8WyI33t060lxpBNAoh092jzMGEnnfPKTVMxnscjFrISzrWXQZs/OoR6q8Yo/+pZAT5gWA0dDOQ== - dependencies: - "@sentry/types" "6.3.1" - "@sentry/utils" "6.3.1" - localforage "^1.8.1" - tslib "^1.9.3" +"@sentry/core@8.55.0", "@sentry/core@^8.54.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.55.0.tgz#4964920229fcf649237ef13b1533dfc4b9f6b22e" + integrity sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA== -"@sentry/react-native@~6.10.0": - version "6.10.0" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-6.10.0.tgz#9efafb9b85870bd4c5189763edde30709b9f3213" - integrity sha512-B56vc+pnFHMiu3cabFb454v4qD0zObW6JVzJ5Gb6fIMdt93AFIJg10ZErzC+ump7xM4BOEROFFRuLiyvadvlPA== +"@sentry/react-native@^6.10.0": + version "6.13.0" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-6.13.0.tgz#f2f16ad04fceaed9d3fc9e4c6f3ccac46efe315e" + integrity sha512-SO43OMODWZr+pIl5HnUoRTAqAPK8sMXedLKnrGneZHp7UjkoX+tAYtkvuFjthPgv50ngHlyvxYsdv2X8dAMtfw== dependencies: - "@sentry/babel-plugin-component-annotate" "3.2.2" + "@sentry/babel-plugin-component-annotate" "3.3.1" "@sentry/browser" "8.54.0" - "@sentry/cli" "2.42.4" + "@sentry/cli" "2.43.1" "@sentry/core" "8.54.0" "@sentry/react" "8.54.0" "@sentry/types" "8.54.0" @@ -7737,11 +7779,6 @@ "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" -"@sentry/types@6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@sentry/types/-/types-6.3.1.tgz#af3b54728b29f633f38fbe51b8c10e3834fbc158" - integrity sha512-BEBn8JX1yaooCAuonbaMci9z0RjwwMbQ3Eny/eyDdd+rjXprZCZaStZnCvSThbNBqAJ8YaUqY2YBMnEwJxarAw== - "@sentry/types@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36" @@ -7749,14 +7786,6 @@ dependencies: "@sentry/core" "8.54.0" -"@sentry/utils@6.3.1": - version "6.3.1" - resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-6.3.1.tgz#6d8e691139b5b49d8c655ad1dcaf2cb3ff0d0b03" - integrity sha512-cdtl/QWC9FtinAuW3w8QfvSfh/Q9ui5vwvjzVHiS1ga/U38edi2XX+cttY39ZYwz0SQG99cE10GOIhd1p7/mAA== - dependencies: - "@sentry/types" "6.3.1" - tslib "^1.9.3" - "@sentry/utils@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.54.0.tgz#5e28e03a249451b4a55200a0787f4e2c59bab2c5" @@ -19033,11 +19062,6 @@ image-to-base64@^2.2.0: dependencies: node-fetch "^2.6.0" -immediate@~3.0.5: - version "3.0.6" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" - integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= - immer@^9.0.21, immer@^9.0.6: version "9.0.21" resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.21.tgz#1e025ea31a40f24fb064f1fef23e931496330176" @@ -20914,13 +20938,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -lie@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e" - integrity sha1-mkNrLMd0bKWd56QfpGmz77dr2H4= - dependencies: - immediate "~3.0.5" - lighthouse-logger@^1.0.0: version "1.3.0" resolved "https://registry.yarnpkg.com/lighthouse-logger/-/lighthouse-logger-1.3.0.tgz#ba6303e739307c4eee18f08249524e7dafd510db" @@ -21092,13 +21109,6 @@ loader-runner@^4.2.0: resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== -localforage@^1.8.1: - version "1.9.0" - resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.9.0.tgz#f3e4d32a8300b362b4634cc4e066d9d00d2f09d1" - integrity sha512-rR1oyNrKulpe+VM9cYmcFn6tsHuokyVHFaCM3+osEmxaHTbEk8oQu6eGDfS6DQLWi/N67XRmB8ECG37OES368g== - dependencies: - lie "3.1.1" - locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -27649,7 +27659,7 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== From 94f8c01b351b0d414e8ff44ac55be990589851b9 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 16:57:06 -0700 Subject: [PATCH 10/19] Replace captureException with captureErrorException --- .../BlockaidBanner/BlockaidBanner.tsx | 4 +- app/core/Engine/Engine.ts | 4 +- app/selectors/accountsController.ts | 4 +- app/store/migrations/023.js | 21 ++++----- app/store/migrations/024.js | 7 ++- app/store/migrations/026.js | 8 ++-- app/store/migrations/028.ts | 10 ++-- app/store/migrations/029.ts | 47 +++++++++---------- app/store/migrations/030.ts | 11 ++--- app/store/migrations/031.ts | 23 +++++---- app/store/migrations/032.ts | 12 ++--- app/store/migrations/033.ts | 14 +++--- app/store/migrations/034.ts | 12 ++--- app/store/migrations/035.ts | 18 +++---- app/store/migrations/036.ts | 22 ++++----- app/store/migrations/037.ts | 12 ++--- app/store/migrations/038.ts | 4 +- app/store/migrations/039.ts | 6 +-- app/store/migrations/040.ts | 4 +- app/store/migrations/041.ts | 4 +- app/store/migrations/042.ts | 9 ++-- app/store/migrations/043.ts | 10 ++-- app/store/migrations/044.ts | 18 +++---- app/store/migrations/045.ts | 4 +- app/store/migrations/046.ts | 13 +++-- app/store/migrations/047.ts | 14 +++--- app/store/migrations/048.ts | 4 +- app/store/migrations/049.ts | 4 +- app/store/migrations/050.ts | 4 +- app/store/migrations/051.ts | 8 ++-- app/store/migrations/052.ts | 14 +++--- app/store/migrations/053.ts | 4 +- app/store/migrations/054.ts | 4 +- app/store/migrations/055.ts | 6 +-- app/store/migrations/056.ts | 4 +- app/store/migrations/058.ts | 4 +- app/store/migrations/059.ts | 4 +- app/store/migrations/063.ts | 29 ++++++++---- app/store/migrations/064.ts | 9 ++-- app/store/migrations/065.ts | 12 ++--- app/store/migrations/066.ts | 6 +-- app/store/migrations/068.ts | 34 +++++++++----- app/store/migrations/069.ts | 4 +- app/store/migrations/070.ts | 4 +- app/store/migrations/071.ts | 4 +- app/store/migrations/072.ts | 41 ++++++++-------- app/store/migrations/074.ts | 4 +- app/store/migrations/util/index.tsx | 8 ++-- app/util/Logger/index.ts | 11 ++--- app/util/sentry/index.ts | 15 ++++++ 50 files changed, 291 insertions(+), 265 deletions(-) create mode 100644 app/util/sentry/index.ts diff --git a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx index 18a7da9c9f74..c5a7551d0689 100644 --- a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx +++ b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx @@ -1,7 +1,6 @@ import React, { useEffect, useState } from 'react'; import { ActivityIndicator } from 'react-native'; import { View } from 'react-native-animatable'; -import { captureException } from '@sentry/react-native'; import { deflate } from 'react-native-gzip'; import { strings } from '../../../../../../../locales/i18n'; @@ -33,6 +32,7 @@ import BlockaidVersionInfo from '../../../../../../lib/ppom/blockaid-version'; import { WALLET_CONNECT_ORIGIN } from '../../../../../../util/walletconnect'; import AppConstants from '../../../../../../core/AppConstants'; import { ConfirmationTopSheetSelectorsIDs } from '../../../../../../../e2e/selectors/Confirmation/ConfirmationView.selectors'; +import { captureErrorException } from '../../../../../../util/sentry'; const getReportUrl = (encodedData: string) => `${FALSE_POSITIVE_REPORT_BASE_URL}?data=${encodeURIComponent( @@ -136,7 +136,7 @@ const BlockaidBanner = (bannerProps: BlockaidBannerProps) => { const unidentifiedReasonError = new Error( `BlockaidBannerAlert: Unidentified reason '${reason}'`, ); - captureException(unidentifiedReasonError); + captureErrorException(unidentifiedReasonError); } const renderDetails = () => diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index 75cae8ca2dc3..72b146a0c91c 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -112,7 +112,6 @@ import { providerErrors } from '@metamask/rpc-errors'; import { PPOM, ppomInit } from '../../lib/ppom/PPOMView'; import RNFSStorageBackend from '../../lib/ppom/ppom-storage-backend'; import { createRemoteFeatureFlagController } from './controllers/remote-feature-flag-controller'; -import { captureException } from '@sentry/react-native'; import { lowerCase } from 'lodash'; import { networkIdUpdated, @@ -199,6 +198,7 @@ import { isProductSafetyDappScanningEnabled } from '../../util/phishingDetection import { appMetadataControllerInit } from './controllers/app-metadata-controller'; import { InternalAccount } from '@metamask/keyring-internal-api'; import { toFormattedAddress } from '../../util/address'; +import { captureErrorException } from '../../util/sentry'; const NON_EMPTY = 'NON_EMPTY'; @@ -779,7 +779,7 @@ export class Engine { ] || {}, ).length; - captureException( + captureErrorException( new Error( `Attempt to get permission specifications failed because there were ${accounts.length} accounts, but ${internalAccountCount} identities, and the ${keyringTypesWithMissingIdentities} keyrings included accounts with missing identities. Meanwhile, there are ${accountTrackerCount} accounts in the account tracker.`, ), diff --git a/app/selectors/accountsController.ts b/app/selectors/accountsController.ts index 783cbb2c0ffa..a24028db113b 100644 --- a/app/selectors/accountsController.ts +++ b/app/selectors/accountsController.ts @@ -1,5 +1,4 @@ import { AccountsControllerState } from '@metamask/accounts-controller'; -import { captureException } from '@sentry/react-native'; import { createSelector } from 'reselect'; import { RootState } from '../reducers'; import { createDeepEqualSelector } from './util'; @@ -20,6 +19,7 @@ import { isBtcTestnetAddress, ///: END:ONLY_INCLUDE_IF } from '../core/Multichain/utils'; +import { captureErrorException } from '../util/sentry'; /** * @@ -69,7 +69,7 @@ export const selectSelectedInternalAccount = createDeepEqualSelector( const err = new Error( `selectSelectedInternalAccount: Account with ID ${accountId} not found.`, ); - captureException(err); + captureErrorException(err); return undefined; } return account; diff --git a/app/store/migrations/023.js b/app/store/migrations/023.js index 502b6ec0966b..215086a5a949 100644 --- a/app/store/migrations/023.js +++ b/app/store/migrations/023.js @@ -1,8 +1,7 @@ import { isObject, hasProperty } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { mapValues } from 'lodash'; import ambiguousNetworks from './migration-data/amibiguous-networks.json'; - +import { captureErrorException } from '../../util/sentry'; /** * Migrate address book state to be keyed by chain ID rather than network ID. * @@ -26,7 +25,7 @@ import ambiguousNetworks from './migration-data/amibiguous-networks.json'; export default function migrate(state) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureException( + captureErrorException( // @ts-expect-error We are not returning state not to stop the flow of Vault recovery new Error( `Migration 23: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, @@ -39,7 +38,7 @@ export default function migrate(state) { state.engine.backgroundState.AddressBookController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 23: Invalid network controller state: '${typeof networkControllerState}'`, ), @@ -49,7 +48,7 @@ export default function migrate(state) { !hasProperty(networkControllerState, 'networkConfigurations') || !isObject(networkControllerState.networkConfigurations) ) { - captureException( + captureErrorException( new Error( `Migration 23: Invalid network configuration state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -66,7 +65,7 @@ export default function migrate(state) { ([_networkConfigId, networkConfiguration]) => !hasProperty(networkConfiguration, 'chainId'), ); - captureException( + captureErrorException( new Error( `Migration 23: Network configuration missing chain ID, id '${invalidConfigurationId}', keys '${Object.keys( invalidConfiguration, @@ -75,7 +74,7 @@ export default function migrate(state) { ); return state; } else if (!isObject(addressBookControllerState)) { - captureException( + captureErrorException( new Error( `Migration 23: Invalid address book controller state: '${typeof addressBookControllerState}'`, ), @@ -85,7 +84,7 @@ export default function migrate(state) { !hasProperty(addressBookControllerState, 'addressBook') || !isObject(addressBookControllerState.addressBook) ) { - captureException( + captureErrorException( new Error( `Migration 23: Invalid address book state: '${typeof addressBookControllerState.addressBook}'`, ), @@ -99,7 +98,7 @@ export default function migrate(state) { const [networkId, invalidEntries] = Object.entries( addressBookControllerState.addressBook, ).find(([_networkId, addressEntries]) => !isObject(addressEntries)); - captureException( + captureErrorException( new Error( `Migration 23: Address book configuration invalid, network id '${networkId}', type '${typeof invalidEntries}'`, ), @@ -123,7 +122,7 @@ export default function migrate(state) { const invalidEntry = Object.values(invalidEntries).find( (addressEntry) => !hasProperty(addressEntry, 'chainId'), ); - captureException( + captureErrorException( new Error( `Migration 23: Address book configuration entry missing chain ID, network id '${networkId}', keys '${Object.keys( invalidEntry, @@ -132,7 +131,7 @@ export default function migrate(state) { ); return state; } else if (!isObject(state.user)) { - captureException( + captureErrorException( new Error(`Migration 23: Invalid user state: '${typeof state.user}'`), ); return state; diff --git a/app/store/migrations/024.js b/app/store/migrations/024.js index 859d13f60b47..7153746ad729 100644 --- a/app/store/migrations/024.js +++ b/app/store/migrations/024.js @@ -1,7 +1,6 @@ import { isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { NetworkStatus } from '@metamask/network-controller'; - +import { captureErrorException } from '../../util/sentry'; /** * Migrate NetworkController state, splitting old `network` property into * `networkId` and `networkStatus`. This is required to update to v8 of the @@ -20,14 +19,14 @@ export default function migrate(state) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 24: Invalid network controller state: '${typeof networkControllerState}'`, ), ); return state; } else if (typeof networkControllerState.network !== 'string') { - captureException( + captureErrorException( new Error( `Migration 24: Invalid network state: '${typeof networkControllerState.network}'`, ), diff --git a/app/store/migrations/026.js b/app/store/migrations/026.js index 7d1f89d23729..bed1c28ca45d 100644 --- a/app/store/migrations/026.js +++ b/app/store/migrations/026.js @@ -1,5 +1,5 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; +import { captureErrorException } from '../../util/sentry'; /** * This migration is to free space of unused data in the user devices @@ -9,7 +9,7 @@ import { isObject } from '@metamask/utils'; export default function migrate(state) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureException( + captureErrorException( // @ts-expect-error We are not returning state not to stop the flow of Vault recovery new Error( `Migration 26: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, @@ -21,7 +21,7 @@ export default function migrate(state) { if (phishingControllerState?.listState) { delete state.engine.backgroundState.PhishingController.listState; } else { - captureException( + captureErrorException( new Error( `Migration 26: Invalid PhishingControllerState controller state: '${JSON.stringify( state.engine.backgroundState.PhishingController, @@ -38,7 +38,7 @@ export default function migrate(state) { state.engine.backgroundState.PhishingController.hotlistLastFetched = 0; state.engine.backgroundState.PhishingController.stalelistLastFetched = 0; } else { - captureException( + captureErrorException( new Error( `Migration 26: Invalid PhishingControllerState hotlist and stale list fetched: '${JSON.stringify( state.engine.backgroundState.PhishingController, diff --git a/app/store/migrations/028.ts b/app/store/migrations/028.ts index 98f008a30491..bb38022ed46a 100644 --- a/app/store/migrations/028.ts +++ b/app/store/migrations/028.ts @@ -1,8 +1,8 @@ import { hasProperty, isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { deepJSONParse } from '../../util/general'; import FilesystemStorage from 'redux-persist-filesystem-storage'; import Device from '../../util/device'; +import { captureErrorException } from '../../util/sentry'; export const controllerList = [ { name: 'AccountTrackerController' }, @@ -62,7 +62,7 @@ export const controllerList = [ */ export default async function migrate(state: unknown) { if (!isObject(state)) { - captureException( + captureErrorException( new Error( `Migration 28: Invalid root state: root state is not an object`, ), @@ -102,7 +102,7 @@ export default async function migrate(state: unknown) { } } } catch (e) { - captureException( + captureErrorException( new Error( `Migration 28: Failed to populate root object with persisted controller data for key ${persistedControllerKey}: ${String( e, @@ -134,7 +134,7 @@ export default async function migrate(state: unknown) { // Remove persisted controller file await FilesystemStorage.removeItem(persistedControllerKey); } catch (e) { - captureException( + captureErrorException( new Error( `Migration 28: Failed to remove key ${persistedControllerKey}: ${String( e, @@ -147,7 +147,7 @@ export default async function migrate(state: unknown) { // Execute deleting persisted controller files in parallel await Promise.all(controllerDeleteMigration); } catch (e) { - captureException( + captureErrorException( new Error(`Migration 28: Failed to get root data: ${String(e)}`), ); } diff --git a/app/store/migrations/029.ts b/app/store/migrations/029.ts index 9a1728b088f1..e2bb0beda734 100644 --- a/app/store/migrations/029.ts +++ b/app/store/migrations/029.ts @@ -1,10 +1,9 @@ import { toHex } from '@metamask/controller-utils'; import { Hex, hasProperty, isObject } from '@metamask/utils'; import { regex } from '../../../app/util/regex'; - +import { captureErrorException } from '../../util/sentry'; import { isHexString } from 'ethereumjs-util'; import { TransactionParams } from '@metamask/transaction-controller'; -import { captureException } from '@sentry/react-native'; import { AddressBookEntry, AddressBookControllerState, @@ -54,21 +53,21 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; // Chaning chain id to hexadecimal chain Id on the networks already on the local state if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 29: Invalid state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error(`Migration 29: Invalid engine state: '${typeof state.engine}'`), ); return state; } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -82,7 +81,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -94,7 +93,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), @@ -103,7 +102,7 @@ export default async function migrate(stateAsync: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NetworkController providerConfig chainId: '${JSON.stringify( networkControllerState.providerConfig.chainId, @@ -136,7 +135,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'networkDetails') || !isObject(networkControllerState.networkDetails) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NetworkController networkDetails: '${JSON.stringify( networkControllerState.networkDetails, @@ -162,7 +161,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'networkConfigurations') || !isObject(networkControllerState.networkConfigurations) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NetworkController networkConfigurations: '${JSON.stringify( networkControllerState.networkConfigurations, @@ -229,7 +228,7 @@ export default async function migrate(stateAsync: unknown) { ?.AddressBookController as AddressBookControllerState; if (!isObject(addressBookControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid AddressBookController state: '${JSON.stringify( addressBookControllerState, @@ -243,7 +242,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(addressBookControllerState, 'addressBook') || !isObject(addressBookControllerState.addressBook) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid AddressBookController addressBook: '${JSON.stringify( addressBookControllerState.addressBook, @@ -296,7 +295,7 @@ export default async function migrate(stateAsync: unknown) { const swapsControllerState = state?.engine?.backgroundState?.SwapsController; if (!isObject(swapsControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid SwapsController state: '${JSON.stringify( swapsControllerState, @@ -331,7 +330,7 @@ export default async function migrate(stateAsync: unknown) { ?.NftController as NftControllerState; if (!isObject(nftControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid NftController state: '${JSON.stringify( nftControllerState, @@ -345,7 +344,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(nftControllerState, 'allNftContracts') || !isObject(nftControllerState.allNftContracts) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid nftControllerState allNftsContracts: '${JSON.stringify( nftControllerState.allNftContracts, @@ -403,7 +402,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(nftControllerState, 'allNfts') || !isObject(nftControllerState.allNfts) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid nftControllerState allNfts: '${JSON.stringify( nftControllerState.allNfts, @@ -451,7 +450,7 @@ export default async function migrate(stateAsync: unknown) { state?.engine?.backgroundState?.TransactionController; if (!isObject(transactionControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TransactionController state: '${JSON.stringify( transactionControllerState, @@ -485,7 +484,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenListController as TokenListState; if (!isObject(tokenListControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokenListController state: '${JSON.stringify( tokenListControllerState, @@ -499,7 +498,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokenListControllerState, 'tokensChainsCache') || !isObject(tokenListControllerState.tokensChainsCache) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid tokenListControllerState tokensChainsCache: '${JSON.stringify( tokenListControllerState.tokensChainsCache, @@ -532,7 +531,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenRatesController as TokenRatesControllerState; if (!isObject(tokenRatesControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokenRatesController state: '${JSON.stringify( tokenRatesControllerState, @@ -575,7 +574,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokensController as TokensControllerState; if (!isObject(tokensControllerState)) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokensController state: '${JSON.stringify( tokensControllerState, @@ -589,7 +588,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allTokens') || !isObject(tokensControllerState.allTokens) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokensController allTokens: '${JSON.stringify( tokensControllerState.allTokens, @@ -618,7 +617,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allIgnoredTokens') || !isObject(tokensControllerState.allIgnoredTokens) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokensController allIgnoredTokens: '${JSON.stringify( tokensControllerState.allIgnoredTokens, @@ -647,7 +646,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allDetectedTokens') || !isObject(tokensControllerState.allDetectedTokens) ) { - captureException( + captureErrorException( new Error( `Migration 29: Invalid TokensController allDetectedTokens: '${JSON.stringify( tokensControllerState.allDetectedTokens, diff --git a/app/store/migrations/030.ts b/app/store/migrations/030.ts index a76bb445768a..595abcf0eb2c 100644 --- a/app/store/migrations/030.ts +++ b/app/store/migrations/030.ts @@ -1,7 +1,6 @@ import { PreferencesState } from '@metamask/preferences-controller'; -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; - +import { captureErrorException } from '../../util/sentry'; /** * Enable security alerts by default. * @param {any} state - Redux state. @@ -10,14 +9,14 @@ import { isObject } from '@metamask/utils'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 30: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 30: Invalid root engine state: '${typeof state.engine}'`, ), @@ -26,7 +25,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 30: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -39,7 +38,7 @@ export default async function migrate(stateAsync: unknown) { .PreferencesController as PreferencesState; if (!isObject(preferencesControllerState)) { - captureException( + captureErrorException( new Error( `Migration 30: Invalid PreferencesController state: '${typeof preferencesControllerState}'`, ), diff --git a/app/store/migrations/031.ts b/app/store/migrations/031.ts index 0ad5dcdf64e3..68b7660096c4 100644 --- a/app/store/migrations/031.ts +++ b/app/store/migrations/031.ts @@ -1,5 +1,4 @@ import { hasProperty, isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { TokenListState, TokenRatesControllerState, @@ -7,7 +6,7 @@ import { } from '@metamask/assets-controllers'; import { toHex } from '@metamask/controller-utils'; import { isHexString } from 'ethereumjs-util'; - +import { captureErrorException } from '../../util/sentry'; /** * This migration is to address the users that were impacted by the tokens missing on their wallet * Because the chain id was not migrated to hexadecimal format @@ -19,7 +18,7 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 31: Invalid state: '${typeof state}'`), ); // Force vault corruption if state is completely corrupt @@ -27,7 +26,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error(`Migration 31: Invalid engine state: '${typeof state.engine}'`), ); // Force vault corruption if state is completely corrupt @@ -36,7 +35,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -52,7 +51,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenListController as TokenListState; if (!isObject(tokenListControllerState)) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokenListController state: '${JSON.stringify( tokenListControllerState, @@ -66,7 +65,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokenListControllerState, 'tokensChainsCache') || !isObject(tokenListControllerState.tokensChainsCache) ) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid tokenListControllerState tokensChainsCache: '${JSON.stringify( tokenListControllerState.tokensChainsCache, @@ -107,7 +106,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenRatesController as TokenRatesControllerState; if (!isObject(tokenRatesControllerState)) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokenRatesController state: '${JSON.stringify( tokenRatesControllerState, @@ -159,7 +158,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokensController as TokensControllerState; if (!isObject(tokensControllerState)) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokensController state: '${JSON.stringify( tokensControllerState, @@ -173,7 +172,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allTokens') || !isObject(tokensControllerState.allTokens) ) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokensController allTokens: '${JSON.stringify( tokensControllerState.allTokens, @@ -208,7 +207,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allIgnoredTokens') || !isObject(tokensControllerState.allIgnoredTokens) ) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokensController allIgnoredTokens: '${JSON.stringify( tokensControllerState.allIgnoredTokens, @@ -243,7 +242,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allDetectedTokens') || !isObject(tokensControllerState.allDetectedTokens) ) { - captureException( + captureErrorException( new Error( `Migration 31: Invalid TokensController allDetectedTokens: '${JSON.stringify( tokensControllerState.allDetectedTokens, diff --git a/app/store/migrations/032.ts b/app/store/migrations/032.ts index 6254c54b58db..6ce32e5f3669 100644 --- a/app/store/migrations/032.ts +++ b/app/store/migrations/032.ts @@ -1,7 +1,7 @@ import { hasProperty, isObject } from '@metamask/utils'; import migration29 from './029'; import migration30 from './030'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; /** * Enable security alerts by default. @@ -12,14 +12,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 32: Invalid state: '${typeof state}'`), ); return {}; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error(`Migration 32: Invalid engine state: '${typeof state.engine}'`), ); const { engine, ...restState } = state; @@ -27,7 +27,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 32: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 32: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureException( + captureErrorException( new Error( `Migration 32: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/033.ts b/app/store/migrations/033.ts index 95430ba849e4..c752ee2844fb 100644 --- a/app/store/migrations/033.ts +++ b/app/store/migrations/033.ts @@ -1,20 +1,20 @@ import { CHAIN_IDS } from '@metamask/transaction-controller'; import { SEPOLIA } from '../../constants/network'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import { isObject } from '@metamask/utils'; import NetworkList from '../../util/networks'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 33: Invalid state error: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 33: Invalid engine state error: '${typeof state.engine}'`, ), @@ -23,7 +23,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 33: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -33,7 +33,7 @@ export default async function migrate(stateAsync: unknown) { } const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 33: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -42,7 +42,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(networkControllerState.providerConfig)) { - captureException( + captureErrorException( new Error( `Migration 33: NetworkController providerConfig not found: '${networkControllerState.providerConfig}'`, ), @@ -51,7 +51,7 @@ export default async function migrate(stateAsync: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureException( + captureErrorException( new Error( `Migration 33: NetworkController providerConfig chainId not found: '${JSON.stringify( networkControllerState.providerConfig.chainId, diff --git a/app/store/migrations/034.ts b/app/store/migrations/034.ts index edd1243ca262..6ca028b842b3 100644 --- a/app/store/migrations/034.ts +++ b/app/store/migrations/034.ts @@ -1,5 +1,5 @@ -import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; +import { captureErrorException } from '../../util/sentry'; interface NetworkState { providerConfig: { @@ -23,14 +23,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 34: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 34: Invalid root engine state: '${typeof state.engine}'`, ), @@ -39,7 +39,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 34: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -53,7 +53,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 34: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -65,7 +65,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureException( + captureErrorException( new Error( `Migration 34: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/035.ts b/app/store/migrations/035.ts index 39a92e56413c..70a09cc0709a 100644 --- a/app/store/migrations/035.ts +++ b/app/store/migrations/035.ts @@ -1,7 +1,7 @@ -import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { NetworkState, NetworkStatus } from '@metamask/network-controller'; import { InfuraNetworkType } from '@metamask/controller-utils'; +import { captureErrorException } from '../../util/sentry'; /** * This migration removes networkDetails and networkStatus property @@ -13,14 +13,14 @@ import { InfuraNetworkType } from '@metamask/controller-utils'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 35: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid root engine state: '${typeof state.engine}'`, ), @@ -29,7 +29,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -64,7 +64,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.networkDetails) || !hasProperty(networkControllerState, 'networkDetails') ) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid NetworkController networkDetails state: '${typeof networkControllerState.networkDetails}'`, ), @@ -76,7 +76,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.networkConfigurations) || !hasProperty(networkControllerState, 'networkConfigurations') ) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid NetworkController networkConfigurations state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -88,7 +88,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.providerConfig) || !hasProperty(networkControllerState, 'providerConfig') ) { - captureException( + captureErrorException( new Error( `Migration 35: Invalid NetworkController providerConfig state: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/036.ts b/app/store/migrations/036.ts index 76fe8b484a5b..dee8e2ca2010 100644 --- a/app/store/migrations/036.ts +++ b/app/store/migrations/036.ts @@ -1,10 +1,10 @@ import { EthAccountType, EthScope } from '@metamask/keyring-api'; import { InternalAccount } from '@metamask/keyring-internal-api'; import { isObject, hasProperty } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { getUUIDFromAddressOfNormalAccount } from '@metamask/accounts-controller'; import { KeyringTypes } from '@metamask/keyring-controller'; import { ETH_EOA_METHODS } from '../../constants/eth-methods'; +import { captureErrorException } from '../../util/sentry'; export interface Identity { name: string; @@ -15,14 +15,14 @@ export interface Identity { export default function migrate(state: unknown) { if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 36: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 36: Invalid root engine state: '${typeof state.engine}'`, ), @@ -31,7 +31,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 36: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -42,7 +42,7 @@ export default function migrate(state: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureException( + captureErrorException( new Error( `Migration 36: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -50,7 +50,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState.PreferencesController)) { - captureException( + captureErrorException( new Error( `Migration 36: Invalid PreferencesController state: '${typeof state .engine.backgroundState.PreferencesController}'`, @@ -64,7 +64,7 @@ export default function migrate(state: unknown) { 'identities', ) ) { - captureException( + captureErrorException( new Error( `Migration 36: Missing identities property from PreferencesController: '${typeof state .engine.backgroundState.PreferencesController}'`, @@ -99,7 +99,7 @@ function createInternalAccountsForAccountsController( } = state.engine.backgroundState.PreferencesController?.identities || {}; if (Object.keys(identities).length === 0) { - captureException( + captureErrorException( new Error(`Migration 36: PreferencesController?.identities are empty'`), ); return; @@ -160,7 +160,7 @@ function createSelectedAccountForAccountsController( // Handle the case where the selectedAddress from preferences controller is either not defined or not a string if (!selectedAddress || typeof selectedAddress !== 'string') { - captureException( + captureErrorException( new Error( `Migration 36: Invalid selectedAddress. state.engine.backgroundState.PreferencesController?.selectedAddress is not a string:'${typeof selectedAddress}'. Setting selectedAddress to the first account.`, ), @@ -173,7 +173,7 @@ function createSelectedAccountForAccountsController( if (internalAccount) { if (internalAccount.id === undefined) { - captureException( + captureErrorException( new Error( `Migration 36: selectedAccount will be undefined because internalAccount.id is undefined.`, ), @@ -190,7 +190,7 @@ function createSelectedAccountForAccountsController( const selectedAccount = findInternalAccountByAddress(state, selectedAddress); if (selectedAccount) { if (selectedAccount.id === undefined) { - captureException( + captureErrorException( new Error( `Migration 36: selectedAccount will be undefined because selectedAccount.id is undefined.`, ), diff --git a/app/store/migrations/037.ts b/app/store/migrations/037.ts index 4c69a94cd45e..ba1a474975a7 100644 --- a/app/store/migrations/037.ts +++ b/app/store/migrations/037.ts @@ -1,18 +1,18 @@ import { isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration 37: Invalid state error: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration 37: Invalid engine state error: '${typeof state.engine}'`, ), @@ -21,7 +21,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration 37: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -32,7 +32,7 @@ export default async function migrate(stateAsync: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureException( + captureErrorException( new Error( `Migration 37: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -42,7 +42,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration 37: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), diff --git a/app/store/migrations/038.ts b/app/store/migrations/038.ts index 65fb283446b0..30978ee8f09d 100644 --- a/app/store/migrations/038.ts +++ b/app/store/migrations/038.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 38)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const currencyRateState = state.engine.backgroundState.CurrencyRateController; if (!isObject(currencyRateState)) { - captureException( + captureErrorException( new Error( `Migration 38: Invalid CurrencyRateController state error: '${JSON.stringify( currencyRateState, diff --git a/app/store/migrations/039.ts b/app/store/migrations/039.ts index 6aebe1db3e2e..11f803ac3160 100644 --- a/app/store/migrations/039.ts +++ b/app/store/migrations/039.ts @@ -1,5 +1,5 @@ import { isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import { ensureValidState } from './util'; export default function migrate(state: unknown) { @@ -8,7 +8,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState.TransactionController)) { - captureException( + captureErrorException( new Error( `Migration 39: Invalid TransactionController state: '${state.engine.backgroundState.TransactionController}'`, ), @@ -20,7 +20,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TransactionController; if (!Array.isArray(transactionControllerState.transactions)) { - captureException( + captureErrorException( new Error( `Migration 39: Missing transactions property from TransactionController: '${typeof state .engine.backgroundState.TransactionController}'`, diff --git a/app/store/migrations/040.ts b/app/store/migrations/040.ts index e71c9100ca84..a7eb40036182 100644 --- a/app/store/migrations/040.ts +++ b/app/store/migrations/040.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to remove metadata from Permissioned accounts @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PermissionController; if (!isObject(permissionControllerState)) { - captureException( + captureErrorException( new Error( `Migration 40: Invalid PermissionController state error: '${JSON.stringify( permissionControllerState, diff --git a/app/store/migrations/041.ts b/app/store/migrations/041.ts index 609a66a14d9b..b0e9843d5a6f 100644 --- a/app/store/migrations/041.ts +++ b/app/store/migrations/041.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to reset state of TokenBalancesController @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TokenBalancesController; if (!isObject(tokenBalancesControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 41: Invalid TokenBalancesController state error: '${JSON.stringify( tokenBalancesControllerState, diff --git a/app/store/migrations/042.ts b/app/store/migrations/042.ts index 1d3032b24849..4d77144a45f4 100644 --- a/app/store/migrations/042.ts +++ b/app/store/migrations/042.ts @@ -1,5 +1,4 @@ import { isObject, hasProperty } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { ValidState, ensureValidState } from './util'; import { AccountsControllerState, @@ -8,14 +7,14 @@ import { import { InternalAccount } from '@metamask/keyring-internal-api'; import { isDefaultAccountName } from '../../util/ENSUtils'; import { ETH_EOA_METHODS } from '../../constants/eth-methods'; - +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 42)) { return state; } if (!isObject(state.engine.backgroundState.AccountsController)) { - captureException( + captureErrorException( new Error( `Migration 42: Invalid AccountsController state: '${typeof state.engine .backgroundState.AccountsController}'`, @@ -30,7 +29,7 @@ export default function migrate(state: unknown) { 'internalAccounts', ) ) { - captureException( + captureErrorException( new Error( `Migration 42: Missing internalAccounts property from AccountsController: '${typeof state .engine.backgroundState.AccountsController}'`, @@ -92,7 +91,7 @@ function mergeInternalAccounts(state: ValidState) { addressMap[selectedAddress] || Object.keys(mergedAccounts)[0]; // Default to the first account in the list accountsController.internalAccounts.accounts = mergedAccounts; if (newSelectedAccountId === undefined) { - captureException( + captureErrorException( new Error( `Migration 42: selectedAccount will be undefined because newSelectedAccountId is undefined. selectedAddress: ${selectedAddress}, addressMap[selectedAddress]: ${addressMap[selectedAddress]}`, ), diff --git a/app/store/migrations/043.ts b/app/store/migrations/043.ts index 9abb3ed1d63d..928133e24cf4 100644 --- a/app/store/migrations/043.ts +++ b/app/store/migrations/043.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import { InfuraNetworkType } from '@metamask/controller-utils'; /** @@ -25,7 +25,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -37,7 +37,7 @@ export default function migrate(state: unknown) { !isObject(networkControllerState.networkConfigurations) || !hasProperty(networkControllerState, 'networkConfigurations') ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController networkConfigurations state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -53,7 +53,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( networkControllerState.networkConfigurations, ).find(([_, networkConfiguration]) => !isObject(networkConfiguration)); - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController network configuration entry with id: '${ invalidEntry?.[0] @@ -67,7 +67,7 @@ export default function migrate(state: unknown) { !isObject(networkControllerState.providerConfig) || !hasProperty(networkControllerState, 'providerConfig') ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController providerConfig state: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/044.ts b/app/store/migrations/044.ts index 6d40cd24deb3..44d83db98c5b 100644 --- a/app/store/migrations/044.ts +++ b/app/store/migrations/044.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import { AccountsControllerState } from '@metamask/accounts-controller'; /** @@ -23,7 +23,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.AccountsController; if (!isObject(accountsControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController state error: '${typeof accountsControllerState}'`, ), @@ -35,7 +35,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState, 'internalAccounts') || !isObject(accountsControllerState.internalAccounts) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController internalAccounts state error: '${typeof accountsControllerState.internalAccounts}'`, ), @@ -47,7 +47,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState.internalAccounts, 'accounts') || !isObject(accountsControllerState.internalAccounts.accounts) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController internalAccounts accounts state error: '${typeof accountsControllerState .internalAccounts.accounts}'`, @@ -64,7 +64,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => !isObject(account)); - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController account entry with id: '${ invalidEntry?.[0] @@ -82,7 +82,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => isObject(account) && !isObject(account.metadata)); - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController account metadata entry with id: '${ invalidEntry?.[0] @@ -96,7 +96,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PreferencesController; if (!isObject(preferencesControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController state error: '${typeof preferencesControllerState}'`, ), @@ -108,7 +108,7 @@ export default function migrate(state: unknown) { !hasProperty(preferencesControllerState, 'identities') || !isObject(preferencesControllerState.identities) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController identities state error: '${typeof preferencesControllerState.identities}'`, ), @@ -124,7 +124,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( preferencesControllerState.identities, ).find(([_, identity]) => !isObject(identity)); - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController identity entry with type: '${typeof invalidEntry?.[1]}'`, ), diff --git a/app/store/migrations/045.ts b/app/store/migrations/045.ts index fa6c6a849a3a..3beca8b78aa6 100644 --- a/app/store/migrations/045.ts +++ b/app/store/migrations/045.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to update state of GasFeeController @@ -16,7 +16,7 @@ export default function migrate(state: unknown) { const gasFeeControllerState = state.engine.backgroundState.GasFeeController; if (!isObject(gasFeeControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 45: Invalid GasFeeController state error: '${JSON.stringify( gasFeeControllerState, diff --git a/app/store/migrations/046.ts b/app/store/migrations/046.ts index 7ed8b8e3e646..684e6a38c602 100644 --- a/app/store/migrations/046.ts +++ b/app/store/migrations/046.ts @@ -1,11 +1,10 @@ import { CHAIN_IDS } from '@metamask/transaction-controller'; -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { NetworkType } from '@metamask/controller-utils'; import { LINEA_SEPOLIA_BLOCK_EXPLORER } from '../../../app/constants/urls'; import { ensureValidState } from './util'; import { CHAINLIST_CURRENCY_SYMBOLS_MAP } from '../../constants/network'; - +import { captureErrorException } from '../../util/sentry'; interface NetworkState { providerConfig: { chainId: string; @@ -24,7 +23,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 46: Invalid engine state error: '${typeof state.engine}'`, ), @@ -33,7 +32,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 46: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -44,7 +43,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 46: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -53,7 +52,7 @@ export default function migrate(state: unknown) { } if (!networkControllerState.providerConfig) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 46: NetworkController providerConfig not found: '${JSON.stringify( networkControllerState.providerConfig, @@ -64,7 +63,7 @@ export default function migrate(state: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 46: NetworkController providerConfig chainId not found: '${JSON.stringify( networkControllerState.providerConfig.chainId, diff --git a/app/store/migrations/047.ts b/app/store/migrations/047.ts index 77f77f1b21d2..7270dbf7dcfc 100644 --- a/app/store/migrations/047.ts +++ b/app/store/migrations/047.ts @@ -1,9 +1,9 @@ -import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { ensureValidState } from './util'; import { AccountsControllerState } from '@metamask/accounts-controller'; import { PreferencesState } from '@metamask/preferences-controller'; import { toChecksumHexAddress } from '@metamask/controller-utils'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to add importTime property to accounts metadata of accounts controller @@ -20,7 +20,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.AccountsController; if (!isObject(accountsControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController state error: '${typeof accountsControllerState}'`, ), @@ -32,7 +32,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState, 'internalAccounts') || !isObject(accountsControllerState.internalAccounts) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController internalAccounts state error: '${typeof accountsControllerState.internalAccounts}'`, ), @@ -44,7 +44,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState.internalAccounts, 'accounts') || !isObject(accountsControllerState.internalAccounts.accounts) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController internalAccounts accounts state error: '${typeof accountsControllerState .internalAccounts.accounts}'`, @@ -61,7 +61,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => !isObject(account)); - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController entry with id: '${ invalidEntry?.[0] @@ -75,7 +75,7 @@ export default function migrate(state: unknown) { .PreferencesController as PreferencesState; if (!isObject(preferencesControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid PreferencesController state error: '${JSON.stringify( preferencesControllerState, @@ -89,7 +89,7 @@ export default function migrate(state: unknown) { !hasProperty(preferencesControllerState, 'identities') || !isObject(preferencesControllerState.identities) ) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 47: Invalid PreferencesController identities state error: '${preferencesControllerState.identities}'`, ), diff --git a/app/store/migrations/048.ts b/app/store/migrations/048.ts index a2608c190dad..b3982463834c 100644 --- a/app/store/migrations/048.ts +++ b/app/store/migrations/048.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to remove contractExchangeRates and contractExchangeRatesByChainId from the state of TokenRatesController @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TokenRatesController; if (!isObject(tokenRatesControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 48: Invalid TokenRatesController state error: '${typeof tokenRatesControllerState}'`, ), diff --git a/app/store/migrations/049.ts b/app/store/migrations/049.ts index 4c910b5b81bc..aa76e208bf01 100644 --- a/app/store/migrations/049.ts +++ b/app/store/migrations/049.ts @@ -1,5 +1,5 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import { MMKV } from 'react-native-mmkv'; export const storage = new MMKV(); @@ -15,7 +15,7 @@ export default async function migrate(state: unknown) { } await AsyncStorage.removeItem(key); } catch (error) { - captureException( + captureErrorException( new Error( `Failed to migrate key "${key}" from AsyncStorage to MMKV! Error: ${error}`, ), diff --git a/app/store/migrations/050.ts b/app/store/migrations/050.ts index 35910871aabd..cbc4094f8039 100644 --- a/app/store/migrations/050.ts +++ b/app/store/migrations/050.ts @@ -1,5 +1,5 @@ import DefaultPreference from 'react-native-default-preference'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import StorageWrapper from '../storage-wrapper'; /** @@ -18,7 +18,7 @@ export default async function migrate(state: unknown) { } await DefaultPreference.clear(key); } catch (error) { - captureException( + captureErrorException( new Error( `Migration 50: Failed to migrate key "${key}" from DefaultPreference to MMKV! Error: ${error}`, ), diff --git a/app/store/migrations/051.ts b/app/store/migrations/051.ts index ee5bf3129072..948a91230830 100644 --- a/app/store/migrations/051.ts +++ b/app/store/migrations/051.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to overwrite MATIC token ticker to POL @@ -16,7 +16,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 51: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -25,7 +25,7 @@ export default function migrate(state: unknown) { } if (!isObject(networkControllerState.networkConfigurations)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 51: NetworkController networkConfigurations not found: '${JSON.stringify( networkControllerState.networkConfigurations, @@ -36,7 +36,7 @@ export default function migrate(state: unknown) { } if (!isObject(networkControllerState.providerConfig)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 51: providerConfig not found: '${JSON.stringify( networkControllerState.providerConfig, diff --git a/app/store/migrations/052.ts b/app/store/migrations/052.ts index dc3cc8d03f99..f48e1dce2d3c 100644 --- a/app/store/migrations/052.ts +++ b/app/store/migrations/052.ts @@ -1,7 +1,7 @@ -import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; import { AccountsControllerState } from '@metamask/accounts-controller'; +import { captureErrorException } from '../../util/sentry'; /** * Validates AccountsController state @@ -14,7 +14,7 @@ function isAccountsControllerState( migrationNumber: number, ): state is AccountsControllerState { if (!isObject(state)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: AccountsController state is not an object, type: '${typeof state}'`, ), @@ -23,7 +23,7 @@ function isAccountsControllerState( } if (!hasProperty(state, 'internalAccounts')) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: missing internalAccounts`, ), @@ -32,7 +32,7 @@ function isAccountsControllerState( } if (!isObject(state.internalAccounts)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: internalAccounts is not an object, type: '${typeof state.internalAccounts}'`, ), @@ -41,7 +41,7 @@ function isAccountsControllerState( } if (!hasProperty(state.internalAccounts, 'accounts')) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: missing internalAccounts.accounts`, ), @@ -50,7 +50,7 @@ function isAccountsControllerState( } if (!isObject(state.internalAccounts.accounts)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: internalAccounts.accounts is not an object, type: '${typeof state .internalAccounts.accounts}'`, @@ -91,7 +91,7 @@ export const migration52 = (state: unknown, migrationNumber: number) => { (!selectedAccount || (selectedAccount && !accounts[selectedAccount])) ) { if (Object.values(accounts)[0].id === undefined) { - captureException( + captureErrorException( new Error( `Migration 52: selectedAccount will be undefined because Object.values(accounts)[0].id is undefined.`, ), diff --git a/app/store/migrations/053.ts b/app/store/migrations/053.ts index ef29a2cc7df7..3f94f92751dd 100644 --- a/app/store/migrations/053.ts +++ b/app/store/migrations/053.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 53)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 53: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), diff --git a/app/store/migrations/054.ts b/app/store/migrations/054.ts index b26c5dc9aa0f..27c69e7c0b4c 100644 --- a/app/store/migrations/054.ts +++ b/app/store/migrations/054.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 54)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const tokensControllerState = state.engine.backgroundState.TokensController; if (!isObject(tokensControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 54: Invalid TokensController state error: '${typeof tokensControllerState}'`, ), diff --git a/app/store/migrations/055.ts b/app/store/migrations/055.ts index 04302aa76590..57ef36b96acc 100644 --- a/app/store/migrations/055.ts +++ b/app/store/migrations/055.ts @@ -1,9 +1,9 @@ -import { captureException } from '@sentry/react-native'; import { TransactionMeta } from '@metamask/transaction-controller'; import { parse, equal } from 'uri-js'; import { SelectedNetworkControllerState } from '@metamask/selected-network-controller'; import { hasProperty, isObject, RuntimeObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export const version = 55; @@ -77,7 +77,7 @@ export default function migrate(state: unknown) { ?.SelectedNetworkController as SelectedNetworkControllerState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${version}: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -86,7 +86,7 @@ export default function migrate(state: unknown) { } if (!isObject(transactionControllerState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${version}: Invalid TransactionController state error: '${typeof transactionControllerState}'`, ), diff --git a/app/store/migrations/056.ts b/app/store/migrations/056.ts index df29f5ba5e63..bb5384953ace 100644 --- a/app/store/migrations/056.ts +++ b/app/store/migrations/056.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 56)) { @@ -12,7 +12,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PreferencesController; if (!isObject(preferencesController)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 56: Invalid PreferencesController state error: '${typeof preferencesController}'`, ), diff --git a/app/store/migrations/058.ts b/app/store/migrations/058.ts index b7708f0fcd69..2352a868c4be 100644 --- a/app/store/migrations/058.ts +++ b/app/store/migrations/058.ts @@ -1,6 +1,6 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 58)) { @@ -9,7 +9,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.settings)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration 58: Invalid Settings state error: '${typeof state.settings}'`, ), diff --git a/app/store/migrations/059.ts b/app/store/migrations/059.ts index 8daef82e0f53..3b4cec5ede71 100644 --- a/app/store/migrations/059.ts +++ b/app/store/migrations/059.ts @@ -1,7 +1,7 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; import Logger from '../../util/Logger'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; /** * Migration for checking if selectedAccount on AccountsController is undefined @@ -51,7 +51,7 @@ export default function migrate(state: unknown) { `Migration 59: Setting selectedAccount to the id of the first account.`, ); if (firstAccount.id === undefined) { - captureException( + captureErrorException( new Error( `Migration 59: selectedAccount will be undefined because firstAccount.id is undefined.`, ), diff --git a/app/store/migrations/063.ts b/app/store/migrations/063.ts index 5d453db3cc25..0b10145df8c3 100644 --- a/app/store/migrations/063.ts +++ b/app/store/migrations/063.ts @@ -1,8 +1,11 @@ import { isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { ensureValidState } from './util'; -import { SmartTransactionStatuses, type SmartTransaction } from '@metamask/smart-transactions-controller/dist/types'; +import { + SmartTransactionStatuses, + type SmartTransaction, +} from '@metamask/smart-transactions-controller/dist/types'; import { TransactionStatus, CHAIN_IDS } from '@metamask/transaction-controller'; +import { captureErrorException } from '../../util/sentry'; const migrationVersion = 63; @@ -17,11 +20,13 @@ export default function migrate(state: unknown) { return state; } - const transactionControllerState = state.engine.backgroundState.TransactionController; - const smartTransactionsControllerState = state.engine.backgroundState.SmartTransactionsController; + const transactionControllerState = + state.engine.backgroundState.TransactionController; + const smartTransactionsControllerState = + state.engine.backgroundState.SmartTransactionsController; if (!isObject(transactionControllerState)) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Invalid TransactionController state: '${transactionControllerState}'`, ), @@ -30,7 +35,7 @@ export default function migrate(state: unknown) { } if (!isObject(smartTransactionsControllerState)) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Invalid SmartTransactionsController state: '${smartTransactionsControllerState}'`, ), @@ -39,7 +44,7 @@ export default function migrate(state: unknown) { } if (!Array.isArray(transactionControllerState.transactions)) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Missing transactions property from TransactionController: '${typeof state .engine.backgroundState.TransactionController}'`, @@ -47,9 +52,11 @@ export default function migrate(state: unknown) { ); return state; } - const smartTransactions = (smartTransactionsControllerState?.smartTransactionsState as SmartTransactionsState)?.smartTransactions; + const smartTransactions = ( + smartTransactionsControllerState?.smartTransactionsState as SmartTransactionsState + )?.smartTransactions; if (!isObject(smartTransactions)) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Missing smart transactions property from SmartTransactionsController: '${typeof smartTransactionsControllerState?.smartTransactionsState}'`, ), @@ -80,7 +87,9 @@ export default function migrate(state: unknown) { (smartTransaction) => smartTransaction.txHash && smartTransaction.status && - smartTransactionStatusesForUpdate.includes(smartTransaction.status as SmartTransactionStatuses), + smartTransactionStatusesForUpdate.includes( + smartTransaction.status as SmartTransactionStatuses, + ), ) .map((smartTransaction) => smartTransaction.txHash?.toLowerCase()), ); diff --git a/app/store/migrations/064.ts b/app/store/migrations/064.ts index 048fcbb341cc..75094afa391d 100644 --- a/app/store/migrations/064.ts +++ b/app/store/migrations/064.ts @@ -1,4 +1,3 @@ -import { captureException } from '@sentry/react-native'; import { isObject, hasProperty, Hex } from '@metamask/utils'; import { CHAIN_IDS } from '@metamask/transaction-controller'; import { @@ -8,7 +7,7 @@ import { } from '@metamask/network-controller'; import { ensureValidState } from './util'; import { RootState } from '../../reducers'; - +import { captureErrorException } from '../../util/sentry'; /** * This migration checks if `selectedNetworkClientId` exists in any entry within `networkConfigurationsByChainId`. * If it does not, or if `selectedNetworkClientId` is undefined or invalid, it sets `selectedNetworkClientId` to `'mainnet'`. @@ -71,7 +70,7 @@ function isValidNetworkControllerState( !isObject(networkControllerState) || !hasProperty(state.engine.backgroundState, 'NetworkController') ) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Invalid or missing 'NetworkController' in backgroundState: '${typeof networkControllerState}'`, ), @@ -83,7 +82,7 @@ function isValidNetworkControllerState( !hasProperty(networkControllerState, 'networkConfigurationsByChainId') || !isObject(networkControllerState.networkConfigurationsByChainId) ) { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Missing or invalid 'networkConfigurationsByChainId' in NetworkController`, ), @@ -118,7 +117,7 @@ function doesNetworkClientIdExist( return true; } } else { - captureException( + captureErrorException( new Error( `Migration ${migrationVersion}: Invalid network configuration or missing 'rpcEndpoints' for chainId: '${chainId}'`, ), diff --git a/app/store/migrations/065.ts b/app/store/migrations/065.ts index 8b020d31f7c4..2c5ecb4039c7 100644 --- a/app/store/migrations/065.ts +++ b/app/store/migrations/065.ts @@ -1,7 +1,7 @@ -import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { NetworkState, RpcEndpointType } from '@metamask/network-controller'; import { CHAIN_IDS } from '@metamask/transaction-controller'; +import { captureErrorException } from '../../util/sentry'; /** * Migration to delete Goerli and Linea Goerli configurations if they are Infura types. @@ -12,14 +12,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureException( + captureErrorException( new Error(`Migration: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `Migration: Invalid root engine state: '${typeof state.engine}'`, ), @@ -28,7 +28,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `Migration: Invalid root engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureException( + captureErrorException( new Error( `Migration: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { networkControllerState.networkConfigurationsByChainId; if (!isObject(networkConfigurationsByChainId)) { - captureException( + captureErrorException( new Error( `Migration: Invalid networkConfigurationsByChainId: '${typeof networkConfigurationsByChainId}'`, ), diff --git a/app/store/migrations/066.ts b/app/store/migrations/066.ts index 5d408e9272ac..09722b9a04ae 100644 --- a/app/store/migrations/066.ts +++ b/app/store/migrations/066.ts @@ -10,8 +10,8 @@ import { SolAccountType, SolScope, } from '@metamask/keyring-api'; -import { captureException } from '@sentry/react-native'; import { isBtcMainnetAddress } from '../../core/Multichain/utils'; +import { captureErrorException } from '../../util/sentry'; // Helper to check if a scope is a valid enum value function isValidScope(scope: string): boolean { @@ -49,7 +49,7 @@ function getScopesForAccountType( return [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet]; default: // Default to EVM namespace for unknown account types - captureException( + captureErrorException( new Error( `Migration ${migrationNumber}: Unknown account type ${account.type}, defaulting to EVM EOA`, ), @@ -92,7 +92,7 @@ export function migration66(state: unknown, migrationNumber: number) { state.engine.backgroundState.AccountsController.internalAccounts.accounts, ) ) { - captureException( + captureErrorException( new Error( `Migration ${migrationNumber}: Invalid state structure for AccountsController`, ), diff --git a/app/store/migrations/068.ts b/app/store/migrations/068.ts index 0cbc6e6baa56..b1ee548d3e26 100644 --- a/app/store/migrations/068.ts +++ b/app/store/migrations/068.ts @@ -1,5 +1,5 @@ import { isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; export interface State { engine: { @@ -17,33 +17,45 @@ export interface State { export default function migrate(state: unknown) { if (!isObject(state)) { - captureException( + captureErrorException( new Error( - `FATAL ERROR: Migration 67: Invalid state error: '${state === null ? 'null' : typeof state}'`, + `FATAL ERROR: Migration 67: Invalid state error: '${ + state === null ? 'null' : typeof state + }'`, ), ); return state; } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( - `FATAL ERROR: Migration 67: Invalid engine state error: '${state.engine === null ? 'null' : typeof state.engine}'`, + `FATAL ERROR: Migration 67: Invalid engine state error: '${ + state.engine === null ? 'null' : typeof state.engine + }'`, ), ); return state; } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( - `FATAL ERROR: Migration 67: Invalid engine backgroundState error: '${state.engine.backgroundState === null ? 'null' : typeof state.engine.backgroundState}'`, + `FATAL ERROR: Migration 67: Invalid engine backgroundState error: '${ + state.engine.backgroundState === null + ? 'null' + : typeof state.engine.backgroundState + }'`, ), ); return state; } if (!isObject(state.engine.backgroundState.PreferencesController)) { - captureException( + captureErrorException( new Error( - `FATAL ERROR: Migration 67: Invalid PreferencesController state error: '${state.engine.backgroundState.PreferencesController === null ? 'null' : typeof state.engine.backgroundState.PreferencesController}'`, + `FATAL ERROR: Migration 67: Invalid PreferencesController state error: '${ + state.engine.backgroundState.PreferencesController === null + ? 'null' + : typeof state.engine.backgroundState.PreferencesController + }'`, ), ); return state; @@ -67,11 +79,11 @@ export default function migrate(state: unknown) { if (currentOptInStatus === true) { // User already had it on - no migration change made preferences.smartTransactionsOptInStatus = true; - preferences.featureFlags.smartTransactionsMigrationApplied = false; // Changed to false + preferences.featureFlags.smartTransactionsMigrationApplied = false; // Changed to false } else { // We're changing their setting - mark as migrated preferences.smartTransactionsOptInStatus = true; - preferences.featureFlags.smartTransactionsMigrationApplied = true; // Changed to true + preferences.featureFlags.smartTransactionsMigrationApplied = true; // Changed to true } preferences.featureFlags.smartTransactionsBannerDismissed = false; diff --git a/app/store/migrations/069.ts b/app/store/migrations/069.ts index efd6e4e53c24..814adc61ce82 100644 --- a/app/store/migrations/069.ts +++ b/app/store/migrations/069.ts @@ -1,8 +1,8 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from 'lodash'; import { PRICE_API_CURRENCIES } from '../../core/Multichain/constants'; import { ensureValidState } from './util'; import { hasProperty } from '@metamask/utils'; +import { captureErrorException } from '../../util/sentry'; const DEFAULT_CURRENCY = 'usd'; @@ -27,7 +27,7 @@ export default function migrate(state: unknown) { !isObject(currencyController) || !hasProperty(currencyController, 'currentCurrency') ) { - captureException( + captureErrorException( new Error( `Migration: Invalid CurrencyController state type '${typeof currencyController}'`, ), diff --git a/app/store/migrations/070.ts b/app/store/migrations/070.ts index 83b3a45dec01..b7ae698ba46b 100644 --- a/app/store/migrations/070.ts +++ b/app/store/migrations/070.ts @@ -1,6 +1,6 @@ import { hasProperty } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; /** * Migration 70: Remove 'staking' reducer data @@ -25,7 +25,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureException( + captureErrorException( new Error( `Migration 070: removing staking key failed with error: ${error}`, ), diff --git a/app/store/migrations/071.ts b/app/store/migrations/071.ts index 0b8c999a3e5d..fdffd23ce8e9 100644 --- a/app/store/migrations/071.ts +++ b/app/store/migrations/071.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureException } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; /** * Migration 71: set completedOnboarding based on the state of the KeyringController. @@ -28,7 +28,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureException( + captureErrorException( new Error( `Migration 071: setting completedOnboarding failed with error: ${error}`, ), diff --git a/app/store/migrations/072.ts b/app/store/migrations/072.ts index 934c231676ad..bf6d5f36c99b 100644 --- a/app/store/migrations/072.ts +++ b/app/store/migrations/072.ts @@ -1,17 +1,18 @@ -import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; -import { type NetworkConfiguration, RpcEndpointType } from '@metamask/network-controller'; +import { + type NetworkConfiguration, + RpcEndpointType, +} from '@metamask/network-controller'; import { ChainId, BuiltInNetworkName, NetworkNickname, BUILT_IN_CUSTOM_NETWORKS_RPC, NetworksTicker, - BlockExplorerUrl + BlockExplorerUrl, } from '@metamask/controller-utils'; - import { ensureValidState } from './util'; - +import { captureErrorException } from '../../util/sentry'; /** * Migration 72: Add 'MegaEth Testnet' * @@ -43,20 +44,20 @@ const migration = (state: unknown): unknown => { const megaethTestnet = BuiltInNetworkName.MegaETHTestnet; const megaethTestnetChainId = ChainId[megaethTestnet]; const megaethTestnetConfiguration: NetworkConfiguration = { - blockExplorerUrls: [BlockExplorerUrl[megaethTestnet]], - chainId: megaethTestnetChainId, - defaultRpcEndpointIndex: 0, - defaultBlockExplorerUrlIndex: 0, - name: NetworkNickname[megaethTestnet], - nativeCurrency: NetworksTicker[megaethTestnet], - rpcEndpoints: [ - { - failoverUrls: [], - networkClientId: megaethTestnet, - type: RpcEndpointType.Custom, - url: BUILT_IN_CUSTOM_NETWORKS_RPC.MEGAETH_TESTNET, - }, - ], + blockExplorerUrls: [BlockExplorerUrl[megaethTestnet]], + chainId: megaethTestnetChainId, + defaultRpcEndpointIndex: 0, + defaultBlockExplorerUrlIndex: 0, + name: NetworkNickname[megaethTestnet], + nativeCurrency: NetworksTicker[megaethTestnet], + rpcEndpoints: [ + { + failoverUrls: [], + networkClientId: megaethTestnet, + type: RpcEndpointType.Custom, + url: BUILT_IN_CUSTOM_NETWORKS_RPC.MEGAETH_TESTNET, + }, + ], }; // Regardless if the network already exists, we will overwrite it with our default MegaETH configuration. @@ -66,7 +67,7 @@ const migration = (state: unknown): unknown => { } return state; } catch (error) { - captureException( + captureErrorException( new Error( `Migration 072: Adding MegaETH Testnet failed with error: ${error}`, ), diff --git a/app/store/migrations/074.ts b/app/store/migrations/074.ts index 34704fd6e2a1..5703b17abf72 100644 --- a/app/store/migrations/074.ts +++ b/app/store/migrations/074.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; -import { captureException } from '@sentry/react-native'; import { ensureValidState } from './util'; +import { captureErrorException } from '../../util/sentry'; /** * Migration 74: Remove `tokens`, `detectedTokens`, and `ignoredTokens` from `TokensController` @@ -49,7 +49,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureException( + captureErrorException( new Error(`Migration ${migrationVersion} failed: ${error}`), ); return state; diff --git a/app/store/migrations/util/index.tsx b/app/store/migrations/util/index.tsx index dbc880761234..69ca7e406dbc 100644 --- a/app/store/migrations/util/index.tsx +++ b/app/store/migrations/util/index.tsx @@ -1,5 +1,5 @@ -import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; +import { captureErrorException } from '../../../util/sentry'; export interface ValidState { engine: { @@ -13,7 +13,7 @@ export function ensureValidState( migrationNumber: number, ): state is T & ValidState { if (!isObject(state)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid state error: '${typeof state}'`, ), @@ -22,7 +22,7 @@ export function ensureValidState( } if (!isObject(state.engine)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid engine state error: '${typeof state.engine}'`, ), @@ -31,7 +31,7 @@ export function ensureValidState( } if (!isObject(state.engine.backgroundState)) { - captureException( + captureErrorException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, diff --git a/app/util/Logger/index.ts b/app/util/Logger/index.ts index 0a6a77f67062..d916abed137f 100644 --- a/app/util/Logger/index.ts +++ b/app/util/Logger/index.ts @@ -1,8 +1,5 @@ -import { - addBreadcrumb, - captureException, - withScope, -} from '@sentry/react-native'; +import { addBreadcrumb, withScope } from '@sentry/react-native'; +import { captureErrorException } from '../../util/sentry'; import StorageWrapper from '../../store/storage-wrapper'; import { METRICS_OPT_IN, AGREED, DEBUG } from '../../constants/storage'; @@ -92,10 +89,10 @@ export class AsyncLogger { typeof extra === 'string' ? { message: extra } : extra; withScope((scope) => { scope.setExtras(extras); - captureException(exception); + captureErrorException(exception); }); } else { - captureException(exception); + captureErrorException(exception); } } } diff --git a/app/util/sentry/index.ts b/app/util/sentry/index.ts new file mode 100644 index 000000000000..00f762f66cd5 --- /dev/null +++ b/app/util/sentry/index.ts @@ -0,0 +1,15 @@ +import { captureException } from '@sentry/react-native'; +import { ExclusiveEventHintOrCaptureContext } from '@sentry/core/build/types/utils/prepareEvent'; + +/** + * Capture an error exception in Sentry + * @param exception - The error exception to capture + * @param hint - The hint to capture the exception with + * @returns The event ID of the captured exception + */ +export function captureErrorException( + exception: Error, + hint?: ExclusiveEventHintOrCaptureContext, +) { + return captureException(exception, hint); +} From 86c8524bd192b862bbdff3b2002f48427d92002a Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 16:57:23 -0700 Subject: [PATCH 11/19] Remove Sentry patch --- app/util/sentry/index.ts | 2 ++ patches/@sentry+core+8.54.0.patch | 16 ---------------- 2 files changed, 2 insertions(+), 16 deletions(-) delete mode 100644 patches/@sentry+core+8.54.0.patch diff --git a/app/util/sentry/index.ts b/app/util/sentry/index.ts index 00f762f66cd5..5e088c794c5f 100644 --- a/app/util/sentry/index.ts +++ b/app/util/sentry/index.ts @@ -6,6 +6,8 @@ import { ExclusiveEventHintOrCaptureContext } from '@sentry/core/build/types/uti * @param exception - The error exception to capture * @param hint - The hint to capture the exception with * @returns The event ID of the captured exception + * + * Report Error for better stack tracing - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors */ export function captureErrorException( exception: Error, diff --git a/patches/@sentry+core+8.54.0.patch b/patches/@sentry+core+8.54.0.patch deleted file mode 100644 index 98903859eded..000000000000 --- a/patches/@sentry+core+8.54.0.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/node_modules/@sentry/core/build/types/exports.d.ts b/node_modules/@sentry/core/build/types/exports.d.ts -index 5402c50..79a162b 100644 ---- a/node_modules/@sentry/core/build/types/exports.d.ts -+++ b/node_modules/@sentry/core/build/types/exports.d.ts -@@ -6,8 +6,10 @@ import type { ExclusiveEventHintOrCaptureContext } from './utils/prepareEvent'; - * @param exception The exception to capture. - * @param hint Optional additional data to attach to the Sentry event. - * @returns the id of the captured Sentry event. -+ * -+ * Patch to enforce better stack tracing using Error - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors - */ --export declare function captureException(exception: unknown, hint?: ExclusiveEventHintOrCaptureContext): string; -+export declare function captureException(exception: Error, hint?: ExclusiveEventHintOrCaptureContext): string; - /** - * Captures a message event and sends it to Sentry. - * From ec1c04d6f8d788295e750936fdc1abb72c7c07ed Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 21:52:50 -0700 Subject: [PATCH 12/19] Revert "Replace captureException with captureErrorException" This reverts commit 94f8c01b351b0d414e8ff44ac55be990589851b9. --- .../BlockaidBanner/BlockaidBanner.tsx | 4 +- app/core/Engine/Engine.ts | 4 +- app/selectors/accountsController.ts | 4 +- app/store/migrations/023.js | 21 +++++---- app/store/migrations/024.js | 7 +-- app/store/migrations/026.js | 8 ++-- app/store/migrations/028.ts | 10 ++-- app/store/migrations/029.ts | 47 ++++++++++--------- app/store/migrations/030.ts | 11 +++-- app/store/migrations/031.ts | 23 ++++----- app/store/migrations/032.ts | 12 ++--- app/store/migrations/033.ts | 14 +++--- app/store/migrations/034.ts | 12 ++--- app/store/migrations/035.ts | 18 +++---- app/store/migrations/036.ts | 22 ++++----- app/store/migrations/037.ts | 12 ++--- app/store/migrations/038.ts | 4 +- app/store/migrations/039.ts | 6 +-- app/store/migrations/040.ts | 4 +- app/store/migrations/041.ts | 4 +- app/store/migrations/042.ts | 9 ++-- app/store/migrations/043.ts | 10 ++-- app/store/migrations/044.ts | 18 +++---- app/store/migrations/045.ts | 4 +- app/store/migrations/046.ts | 13 ++--- app/store/migrations/047.ts | 14 +++--- app/store/migrations/048.ts | 4 +- app/store/migrations/049.ts | 4 +- app/store/migrations/050.ts | 4 +- app/store/migrations/051.ts | 8 ++-- app/store/migrations/052.ts | 14 +++--- app/store/migrations/053.ts | 4 +- app/store/migrations/054.ts | 4 +- app/store/migrations/055.ts | 6 +-- app/store/migrations/056.ts | 4 +- app/store/migrations/058.ts | 4 +- app/store/migrations/059.ts | 4 +- app/store/migrations/063.ts | 29 ++++-------- app/store/migrations/064.ts | 9 ++-- app/store/migrations/065.ts | 12 ++--- app/store/migrations/066.ts | 6 +-- app/store/migrations/068.ts | 34 +++++--------- app/store/migrations/069.ts | 4 +- app/store/migrations/070.ts | 4 +- app/store/migrations/071.ts | 4 +- app/store/migrations/072.ts | 41 ++++++++-------- app/store/migrations/074.ts | 4 +- app/store/migrations/util/index.tsx | 8 ++-- app/util/Logger/index.ts | 11 +++-- app/util/sentry/index.ts | 17 ------- 50 files changed, 265 insertions(+), 293 deletions(-) delete mode 100644 app/util/sentry/index.ts diff --git a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx index c5a7551d0689..18a7da9c9f74 100644 --- a/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx +++ b/app/components/Views/confirmations/legacy/components/BlockaidBanner/BlockaidBanner.tsx @@ -1,6 +1,7 @@ import React, { useEffect, useState } from 'react'; import { ActivityIndicator } from 'react-native'; import { View } from 'react-native-animatable'; +import { captureException } from '@sentry/react-native'; import { deflate } from 'react-native-gzip'; import { strings } from '../../../../../../../locales/i18n'; @@ -32,7 +33,6 @@ import BlockaidVersionInfo from '../../../../../../lib/ppom/blockaid-version'; import { WALLET_CONNECT_ORIGIN } from '../../../../../../util/walletconnect'; import AppConstants from '../../../../../../core/AppConstants'; import { ConfirmationTopSheetSelectorsIDs } from '../../../../../../../e2e/selectors/Confirmation/ConfirmationView.selectors'; -import { captureErrorException } from '../../../../../../util/sentry'; const getReportUrl = (encodedData: string) => `${FALSE_POSITIVE_REPORT_BASE_URL}?data=${encodeURIComponent( @@ -136,7 +136,7 @@ const BlockaidBanner = (bannerProps: BlockaidBannerProps) => { const unidentifiedReasonError = new Error( `BlockaidBannerAlert: Unidentified reason '${reason}'`, ); - captureErrorException(unidentifiedReasonError); + captureException(unidentifiedReasonError); } const renderDetails = () => diff --git a/app/core/Engine/Engine.ts b/app/core/Engine/Engine.ts index 72b146a0c91c..75cae8ca2dc3 100644 --- a/app/core/Engine/Engine.ts +++ b/app/core/Engine/Engine.ts @@ -112,6 +112,7 @@ import { providerErrors } from '@metamask/rpc-errors'; import { PPOM, ppomInit } from '../../lib/ppom/PPOMView'; import RNFSStorageBackend from '../../lib/ppom/ppom-storage-backend'; import { createRemoteFeatureFlagController } from './controllers/remote-feature-flag-controller'; +import { captureException } from '@sentry/react-native'; import { lowerCase } from 'lodash'; import { networkIdUpdated, @@ -198,7 +199,6 @@ import { isProductSafetyDappScanningEnabled } from '../../util/phishingDetection import { appMetadataControllerInit } from './controllers/app-metadata-controller'; import { InternalAccount } from '@metamask/keyring-internal-api'; import { toFormattedAddress } from '../../util/address'; -import { captureErrorException } from '../../util/sentry'; const NON_EMPTY = 'NON_EMPTY'; @@ -779,7 +779,7 @@ export class Engine { ] || {}, ).length; - captureErrorException( + captureException( new Error( `Attempt to get permission specifications failed because there were ${accounts.length} accounts, but ${internalAccountCount} identities, and the ${keyringTypesWithMissingIdentities} keyrings included accounts with missing identities. Meanwhile, there are ${accountTrackerCount} accounts in the account tracker.`, ), diff --git a/app/selectors/accountsController.ts b/app/selectors/accountsController.ts index a24028db113b..783cbb2c0ffa 100644 --- a/app/selectors/accountsController.ts +++ b/app/selectors/accountsController.ts @@ -1,4 +1,5 @@ import { AccountsControllerState } from '@metamask/accounts-controller'; +import { captureException } from '@sentry/react-native'; import { createSelector } from 'reselect'; import { RootState } from '../reducers'; import { createDeepEqualSelector } from './util'; @@ -19,7 +20,6 @@ import { isBtcTestnetAddress, ///: END:ONLY_INCLUDE_IF } from '../core/Multichain/utils'; -import { captureErrorException } from '../util/sentry'; /** * @@ -69,7 +69,7 @@ export const selectSelectedInternalAccount = createDeepEqualSelector( const err = new Error( `selectSelectedInternalAccount: Account with ID ${accountId} not found.`, ); - captureErrorException(err); + captureException(err); return undefined; } return account; diff --git a/app/store/migrations/023.js b/app/store/migrations/023.js index 215086a5a949..502b6ec0966b 100644 --- a/app/store/migrations/023.js +++ b/app/store/migrations/023.js @@ -1,7 +1,8 @@ import { isObject, hasProperty } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { mapValues } from 'lodash'; import ambiguousNetworks from './migration-data/amibiguous-networks.json'; -import { captureErrorException } from '../../util/sentry'; + /** * Migrate address book state to be keyed by chain ID rather than network ID. * @@ -25,7 +26,7 @@ import { captureErrorException } from '../../util/sentry'; export default function migrate(state) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureErrorException( + captureException( // @ts-expect-error We are not returning state not to stop the flow of Vault recovery new Error( `Migration 23: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, @@ -38,7 +39,7 @@ export default function migrate(state) { state.engine.backgroundState.AddressBookController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 23: Invalid network controller state: '${typeof networkControllerState}'`, ), @@ -48,7 +49,7 @@ export default function migrate(state) { !hasProperty(networkControllerState, 'networkConfigurations') || !isObject(networkControllerState.networkConfigurations) ) { - captureErrorException( + captureException( new Error( `Migration 23: Invalid network configuration state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -65,7 +66,7 @@ export default function migrate(state) { ([_networkConfigId, networkConfiguration]) => !hasProperty(networkConfiguration, 'chainId'), ); - captureErrorException( + captureException( new Error( `Migration 23: Network configuration missing chain ID, id '${invalidConfigurationId}', keys '${Object.keys( invalidConfiguration, @@ -74,7 +75,7 @@ export default function migrate(state) { ); return state; } else if (!isObject(addressBookControllerState)) { - captureErrorException( + captureException( new Error( `Migration 23: Invalid address book controller state: '${typeof addressBookControllerState}'`, ), @@ -84,7 +85,7 @@ export default function migrate(state) { !hasProperty(addressBookControllerState, 'addressBook') || !isObject(addressBookControllerState.addressBook) ) { - captureErrorException( + captureException( new Error( `Migration 23: Invalid address book state: '${typeof addressBookControllerState.addressBook}'`, ), @@ -98,7 +99,7 @@ export default function migrate(state) { const [networkId, invalidEntries] = Object.entries( addressBookControllerState.addressBook, ).find(([_networkId, addressEntries]) => !isObject(addressEntries)); - captureErrorException( + captureException( new Error( `Migration 23: Address book configuration invalid, network id '${networkId}', type '${typeof invalidEntries}'`, ), @@ -122,7 +123,7 @@ export default function migrate(state) { const invalidEntry = Object.values(invalidEntries).find( (addressEntry) => !hasProperty(addressEntry, 'chainId'), ); - captureErrorException( + captureException( new Error( `Migration 23: Address book configuration entry missing chain ID, network id '${networkId}', keys '${Object.keys( invalidEntry, @@ -131,7 +132,7 @@ export default function migrate(state) { ); return state; } else if (!isObject(state.user)) { - captureErrorException( + captureException( new Error(`Migration 23: Invalid user state: '${typeof state.user}'`), ); return state; diff --git a/app/store/migrations/024.js b/app/store/migrations/024.js index 7153746ad729..859d13f60b47 100644 --- a/app/store/migrations/024.js +++ b/app/store/migrations/024.js @@ -1,6 +1,7 @@ import { isObject } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { NetworkStatus } from '@metamask/network-controller'; -import { captureErrorException } from '../../util/sentry'; + /** * Migrate NetworkController state, splitting old `network` property into * `networkId` and `networkStatus`. This is required to update to v8 of the @@ -19,14 +20,14 @@ export default function migrate(state) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 24: Invalid network controller state: '${typeof networkControllerState}'`, ), ); return state; } else if (typeof networkControllerState.network !== 'string') { - captureErrorException( + captureException( new Error( `Migration 24: Invalid network state: '${typeof networkControllerState.network}'`, ), diff --git a/app/store/migrations/026.js b/app/store/migrations/026.js index bed1c28ca45d..7d1f89d23729 100644 --- a/app/store/migrations/026.js +++ b/app/store/migrations/026.js @@ -1,5 +1,5 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; /** * This migration is to free space of unused data in the user devices @@ -9,7 +9,7 @@ import { captureErrorException } from '../../util/sentry'; export default function migrate(state) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureErrorException( + captureException( // @ts-expect-error We are not returning state not to stop the flow of Vault recovery new Error( `Migration 26: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, @@ -21,7 +21,7 @@ export default function migrate(state) { if (phishingControllerState?.listState) { delete state.engine.backgroundState.PhishingController.listState; } else { - captureErrorException( + captureException( new Error( `Migration 26: Invalid PhishingControllerState controller state: '${JSON.stringify( state.engine.backgroundState.PhishingController, @@ -38,7 +38,7 @@ export default function migrate(state) { state.engine.backgroundState.PhishingController.hotlistLastFetched = 0; state.engine.backgroundState.PhishingController.stalelistLastFetched = 0; } else { - captureErrorException( + captureException( new Error( `Migration 26: Invalid PhishingControllerState hotlist and stale list fetched: '${JSON.stringify( state.engine.backgroundState.PhishingController, diff --git a/app/store/migrations/028.ts b/app/store/migrations/028.ts index bb38022ed46a..98f008a30491 100644 --- a/app/store/migrations/028.ts +++ b/app/store/migrations/028.ts @@ -1,8 +1,8 @@ import { hasProperty, isObject } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { deepJSONParse } from '../../util/general'; import FilesystemStorage from 'redux-persist-filesystem-storage'; import Device from '../../util/device'; -import { captureErrorException } from '../../util/sentry'; export const controllerList = [ { name: 'AccountTrackerController' }, @@ -62,7 +62,7 @@ export const controllerList = [ */ export default async function migrate(state: unknown) { if (!isObject(state)) { - captureErrorException( + captureException( new Error( `Migration 28: Invalid root state: root state is not an object`, ), @@ -102,7 +102,7 @@ export default async function migrate(state: unknown) { } } } catch (e) { - captureErrorException( + captureException( new Error( `Migration 28: Failed to populate root object with persisted controller data for key ${persistedControllerKey}: ${String( e, @@ -134,7 +134,7 @@ export default async function migrate(state: unknown) { // Remove persisted controller file await FilesystemStorage.removeItem(persistedControllerKey); } catch (e) { - captureErrorException( + captureException( new Error( `Migration 28: Failed to remove key ${persistedControllerKey}: ${String( e, @@ -147,7 +147,7 @@ export default async function migrate(state: unknown) { // Execute deleting persisted controller files in parallel await Promise.all(controllerDeleteMigration); } catch (e) { - captureErrorException( + captureException( new Error(`Migration 28: Failed to get root data: ${String(e)}`), ); } diff --git a/app/store/migrations/029.ts b/app/store/migrations/029.ts index e2bb0beda734..9a1728b088f1 100644 --- a/app/store/migrations/029.ts +++ b/app/store/migrations/029.ts @@ -1,9 +1,10 @@ import { toHex } from '@metamask/controller-utils'; import { Hex, hasProperty, isObject } from '@metamask/utils'; import { regex } from '../../../app/util/regex'; -import { captureErrorException } from '../../util/sentry'; + import { isHexString } from 'ethereumjs-util'; import { TransactionParams } from '@metamask/transaction-controller'; +import { captureException } from '@sentry/react-native'; import { AddressBookEntry, AddressBookControllerState, @@ -53,21 +54,21 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; // Chaning chain id to hexadecimal chain Id on the networks already on the local state if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 29: Invalid state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error(`Migration 29: Invalid engine state: '${typeof state.engine}'`), ); return state; } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -81,7 +82,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -93,7 +94,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), @@ -102,7 +103,7 @@ export default async function migrate(stateAsync: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NetworkController providerConfig chainId: '${JSON.stringify( networkControllerState.providerConfig.chainId, @@ -135,7 +136,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'networkDetails') || !isObject(networkControllerState.networkDetails) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NetworkController networkDetails: '${JSON.stringify( networkControllerState.networkDetails, @@ -161,7 +162,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'networkConfigurations') || !isObject(networkControllerState.networkConfigurations) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NetworkController networkConfigurations: '${JSON.stringify( networkControllerState.networkConfigurations, @@ -228,7 +229,7 @@ export default async function migrate(stateAsync: unknown) { ?.AddressBookController as AddressBookControllerState; if (!isObject(addressBookControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid AddressBookController state: '${JSON.stringify( addressBookControllerState, @@ -242,7 +243,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(addressBookControllerState, 'addressBook') || !isObject(addressBookControllerState.addressBook) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid AddressBookController addressBook: '${JSON.stringify( addressBookControllerState.addressBook, @@ -295,7 +296,7 @@ export default async function migrate(stateAsync: unknown) { const swapsControllerState = state?.engine?.backgroundState?.SwapsController; if (!isObject(swapsControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid SwapsController state: '${JSON.stringify( swapsControllerState, @@ -330,7 +331,7 @@ export default async function migrate(stateAsync: unknown) { ?.NftController as NftControllerState; if (!isObject(nftControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid NftController state: '${JSON.stringify( nftControllerState, @@ -344,7 +345,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(nftControllerState, 'allNftContracts') || !isObject(nftControllerState.allNftContracts) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid nftControllerState allNftsContracts: '${JSON.stringify( nftControllerState.allNftContracts, @@ -402,7 +403,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(nftControllerState, 'allNfts') || !isObject(nftControllerState.allNfts) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid nftControllerState allNfts: '${JSON.stringify( nftControllerState.allNfts, @@ -450,7 +451,7 @@ export default async function migrate(stateAsync: unknown) { state?.engine?.backgroundState?.TransactionController; if (!isObject(transactionControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TransactionController state: '${JSON.stringify( transactionControllerState, @@ -484,7 +485,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenListController as TokenListState; if (!isObject(tokenListControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokenListController state: '${JSON.stringify( tokenListControllerState, @@ -498,7 +499,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokenListControllerState, 'tokensChainsCache') || !isObject(tokenListControllerState.tokensChainsCache) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid tokenListControllerState tokensChainsCache: '${JSON.stringify( tokenListControllerState.tokensChainsCache, @@ -531,7 +532,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenRatesController as TokenRatesControllerState; if (!isObject(tokenRatesControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokenRatesController state: '${JSON.stringify( tokenRatesControllerState, @@ -574,7 +575,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokensController as TokensControllerState; if (!isObject(tokensControllerState)) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokensController state: '${JSON.stringify( tokensControllerState, @@ -588,7 +589,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allTokens') || !isObject(tokensControllerState.allTokens) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokensController allTokens: '${JSON.stringify( tokensControllerState.allTokens, @@ -617,7 +618,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allIgnoredTokens') || !isObject(tokensControllerState.allIgnoredTokens) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokensController allIgnoredTokens: '${JSON.stringify( tokensControllerState.allIgnoredTokens, @@ -646,7 +647,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allDetectedTokens') || !isObject(tokensControllerState.allDetectedTokens) ) { - captureErrorException( + captureException( new Error( `Migration 29: Invalid TokensController allDetectedTokens: '${JSON.stringify( tokensControllerState.allDetectedTokens, diff --git a/app/store/migrations/030.ts b/app/store/migrations/030.ts index 595abcf0eb2c..a76bb445768a 100644 --- a/app/store/migrations/030.ts +++ b/app/store/migrations/030.ts @@ -1,6 +1,7 @@ import { PreferencesState } from '@metamask/preferences-controller'; +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; + /** * Enable security alerts by default. * @param {any} state - Redux state. @@ -9,14 +10,14 @@ import { captureErrorException } from '../../util/sentry'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 30: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 30: Invalid root engine state: '${typeof state.engine}'`, ), @@ -25,7 +26,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 30: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -38,7 +39,7 @@ export default async function migrate(stateAsync: unknown) { .PreferencesController as PreferencesState; if (!isObject(preferencesControllerState)) { - captureErrorException( + captureException( new Error( `Migration 30: Invalid PreferencesController state: '${typeof preferencesControllerState}'`, ), diff --git a/app/store/migrations/031.ts b/app/store/migrations/031.ts index 68b7660096c4..0ad5dcdf64e3 100644 --- a/app/store/migrations/031.ts +++ b/app/store/migrations/031.ts @@ -1,4 +1,5 @@ import { hasProperty, isObject } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { TokenListState, TokenRatesControllerState, @@ -6,7 +7,7 @@ import { } from '@metamask/assets-controllers'; import { toHex } from '@metamask/controller-utils'; import { isHexString } from 'ethereumjs-util'; -import { captureErrorException } from '../../util/sentry'; + /** * This migration is to address the users that were impacted by the tokens missing on their wallet * Because the chain id was not migrated to hexadecimal format @@ -18,7 +19,7 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 31: Invalid state: '${typeof state}'`), ); // Force vault corruption if state is completely corrupt @@ -26,7 +27,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error(`Migration 31: Invalid engine state: '${typeof state.engine}'`), ); // Force vault corruption if state is completely corrupt @@ -35,7 +36,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -51,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenListController as TokenListState; if (!isObject(tokenListControllerState)) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokenListController state: '${JSON.stringify( tokenListControllerState, @@ -65,7 +66,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokenListControllerState, 'tokensChainsCache') || !isObject(tokenListControllerState.tokensChainsCache) ) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid tokenListControllerState tokensChainsCache: '${JSON.stringify( tokenListControllerState.tokensChainsCache, @@ -106,7 +107,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokenRatesController as TokenRatesControllerState; if (!isObject(tokenRatesControllerState)) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokenRatesController state: '${JSON.stringify( tokenRatesControllerState, @@ -158,7 +159,7 @@ export default async function migrate(stateAsync: unknown) { ?.TokensController as TokensControllerState; if (!isObject(tokensControllerState)) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokensController state: '${JSON.stringify( tokensControllerState, @@ -172,7 +173,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allTokens') || !isObject(tokensControllerState.allTokens) ) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokensController allTokens: '${JSON.stringify( tokensControllerState.allTokens, @@ -207,7 +208,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allIgnoredTokens') || !isObject(tokensControllerState.allIgnoredTokens) ) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokensController allIgnoredTokens: '${JSON.stringify( tokensControllerState.allIgnoredTokens, @@ -242,7 +243,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(tokensControllerState, 'allDetectedTokens') || !isObject(tokensControllerState.allDetectedTokens) ) { - captureErrorException( + captureException( new Error( `Migration 31: Invalid TokensController allDetectedTokens: '${JSON.stringify( tokensControllerState.allDetectedTokens, diff --git a/app/store/migrations/032.ts b/app/store/migrations/032.ts index 6ce32e5f3669..6254c54b58db 100644 --- a/app/store/migrations/032.ts +++ b/app/store/migrations/032.ts @@ -1,7 +1,7 @@ import { hasProperty, isObject } from '@metamask/utils'; import migration29 from './029'; import migration30 from './030'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; /** * Enable security alerts by default. @@ -12,14 +12,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 32: Invalid state: '${typeof state}'`), ); return {}; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error(`Migration 32: Invalid engine state: '${typeof state.engine}'`), ); const { engine, ...restState } = state; @@ -27,7 +27,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 32: Invalid engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 32: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureErrorException( + captureException( new Error( `Migration 32: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/033.ts b/app/store/migrations/033.ts index c752ee2844fb..95430ba849e4 100644 --- a/app/store/migrations/033.ts +++ b/app/store/migrations/033.ts @@ -1,20 +1,20 @@ import { CHAIN_IDS } from '@metamask/transaction-controller'; import { SEPOLIA } from '../../constants/network'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import NetworkList from '../../util/networks'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 33: Invalid state error: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 33: Invalid engine state error: '${typeof state.engine}'`, ), @@ -23,7 +23,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 33: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -33,7 +33,7 @@ export default async function migrate(stateAsync: unknown) { } const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 33: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -42,7 +42,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(networkControllerState.providerConfig)) { - captureErrorException( + captureException( new Error( `Migration 33: NetworkController providerConfig not found: '${networkControllerState.providerConfig}'`, ), @@ -51,7 +51,7 @@ export default async function migrate(stateAsync: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureErrorException( + captureException( new Error( `Migration 33: NetworkController providerConfig chainId not found: '${JSON.stringify( networkControllerState.providerConfig.chainId, diff --git a/app/store/migrations/034.ts b/app/store/migrations/034.ts index 6ca028b842b3..edd1243ca262 100644 --- a/app/store/migrations/034.ts +++ b/app/store/migrations/034.ts @@ -1,5 +1,5 @@ +import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; interface NetworkState { providerConfig: { @@ -23,14 +23,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 34: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 34: Invalid root engine state: '${typeof state.engine}'`, ), @@ -39,7 +39,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 34: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -53,7 +53,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 34: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -65,7 +65,7 @@ export default async function migrate(stateAsync: unknown) { !hasProperty(networkControllerState, 'providerConfig') || !isObject(networkControllerState.providerConfig) ) { - captureErrorException( + captureException( new Error( `Migration 34: Invalid NetworkController providerConfig: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/035.ts b/app/store/migrations/035.ts index 70a09cc0709a..39a92e56413c 100644 --- a/app/store/migrations/035.ts +++ b/app/store/migrations/035.ts @@ -1,7 +1,7 @@ +import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { NetworkState, NetworkStatus } from '@metamask/network-controller'; import { InfuraNetworkType } from '@metamask/controller-utils'; -import { captureErrorException } from '../../util/sentry'; /** * This migration removes networkDetails and networkStatus property @@ -13,14 +13,14 @@ import { captureErrorException } from '../../util/sentry'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 35: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid root engine state: '${typeof state.engine}'`, ), @@ -29,7 +29,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -64,7 +64,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.networkDetails) || !hasProperty(networkControllerState, 'networkDetails') ) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid NetworkController networkDetails state: '${typeof networkControllerState.networkDetails}'`, ), @@ -76,7 +76,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.networkConfigurations) || !hasProperty(networkControllerState, 'networkConfigurations') ) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid NetworkController networkConfigurations state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -88,7 +88,7 @@ export default async function migrate(stateAsync: unknown) { !isObject(networkControllerState.providerConfig) || !hasProperty(networkControllerState, 'providerConfig') ) { - captureErrorException( + captureException( new Error( `Migration 35: Invalid NetworkController providerConfig state: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/036.ts b/app/store/migrations/036.ts index dee8e2ca2010..76fe8b484a5b 100644 --- a/app/store/migrations/036.ts +++ b/app/store/migrations/036.ts @@ -1,10 +1,10 @@ import { EthAccountType, EthScope } from '@metamask/keyring-api'; import { InternalAccount } from '@metamask/keyring-internal-api'; import { isObject, hasProperty } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { getUUIDFromAddressOfNormalAccount } from '@metamask/accounts-controller'; import { KeyringTypes } from '@metamask/keyring-controller'; import { ETH_EOA_METHODS } from '../../constants/eth-methods'; -import { captureErrorException } from '../../util/sentry'; export interface Identity { name: string; @@ -15,14 +15,14 @@ export interface Identity { export default function migrate(state: unknown) { if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 36: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 36: Invalid root engine state: '${typeof state.engine}'`, ), @@ -31,7 +31,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 36: Invalid root engine backgroundState: '${typeof state .engine.backgroundState}'`, @@ -42,7 +42,7 @@ export default function migrate(state: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureErrorException( + captureException( new Error( `Migration 36: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -50,7 +50,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState.PreferencesController)) { - captureErrorException( + captureException( new Error( `Migration 36: Invalid PreferencesController state: '${typeof state .engine.backgroundState.PreferencesController}'`, @@ -64,7 +64,7 @@ export default function migrate(state: unknown) { 'identities', ) ) { - captureErrorException( + captureException( new Error( `Migration 36: Missing identities property from PreferencesController: '${typeof state .engine.backgroundState.PreferencesController}'`, @@ -99,7 +99,7 @@ function createInternalAccountsForAccountsController( } = state.engine.backgroundState.PreferencesController?.identities || {}; if (Object.keys(identities).length === 0) { - captureErrorException( + captureException( new Error(`Migration 36: PreferencesController?.identities are empty'`), ); return; @@ -160,7 +160,7 @@ function createSelectedAccountForAccountsController( // Handle the case where the selectedAddress from preferences controller is either not defined or not a string if (!selectedAddress || typeof selectedAddress !== 'string') { - captureErrorException( + captureException( new Error( `Migration 36: Invalid selectedAddress. state.engine.backgroundState.PreferencesController?.selectedAddress is not a string:'${typeof selectedAddress}'. Setting selectedAddress to the first account.`, ), @@ -173,7 +173,7 @@ function createSelectedAccountForAccountsController( if (internalAccount) { if (internalAccount.id === undefined) { - captureErrorException( + captureException( new Error( `Migration 36: selectedAccount will be undefined because internalAccount.id is undefined.`, ), @@ -190,7 +190,7 @@ function createSelectedAccountForAccountsController( const selectedAccount = findInternalAccountByAddress(state, selectedAddress); if (selectedAccount) { if (selectedAccount.id === undefined) { - captureErrorException( + captureException( new Error( `Migration 36: selectedAccount will be undefined because selectedAccount.id is undefined.`, ), diff --git a/app/store/migrations/037.ts b/app/store/migrations/037.ts index ba1a474975a7..4c69a94cd45e 100644 --- a/app/store/migrations/037.ts +++ b/app/store/migrations/037.ts @@ -1,18 +1,18 @@ import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration 37: Invalid state error: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration 37: Invalid engine state error: '${typeof state.engine}'`, ), @@ -21,7 +21,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration 37: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -32,7 +32,7 @@ export default async function migrate(stateAsync: unknown) { const keyringControllerState = state.engine.backgroundState.KeyringController; if (!isObject(keyringControllerState)) { - captureErrorException( + captureException( new Error( `Migration 37: Invalid vault in KeyringController: '${typeof keyringControllerState}'`, ), @@ -42,7 +42,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration 37: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), diff --git a/app/store/migrations/038.ts b/app/store/migrations/038.ts index 30978ee8f09d..65fb283446b0 100644 --- a/app/store/migrations/038.ts +++ b/app/store/migrations/038.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 38)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const currencyRateState = state.engine.backgroundState.CurrencyRateController; if (!isObject(currencyRateState)) { - captureErrorException( + captureException( new Error( `Migration 38: Invalid CurrencyRateController state error: '${JSON.stringify( currencyRateState, diff --git a/app/store/migrations/039.ts b/app/store/migrations/039.ts index 11f803ac3160..6aebe1db3e2e 100644 --- a/app/store/migrations/039.ts +++ b/app/store/migrations/039.ts @@ -1,5 +1,5 @@ import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import { ensureValidState } from './util'; export default function migrate(state: unknown) { @@ -8,7 +8,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState.TransactionController)) { - captureErrorException( + captureException( new Error( `Migration 39: Invalid TransactionController state: '${state.engine.backgroundState.TransactionController}'`, ), @@ -20,7 +20,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TransactionController; if (!Array.isArray(transactionControllerState.transactions)) { - captureErrorException( + captureException( new Error( `Migration 39: Missing transactions property from TransactionController: '${typeof state .engine.backgroundState.TransactionController}'`, diff --git a/app/store/migrations/040.ts b/app/store/migrations/040.ts index a7eb40036182..e71c9100ca84 100644 --- a/app/store/migrations/040.ts +++ b/app/store/migrations/040.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to remove metadata from Permissioned accounts @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PermissionController; if (!isObject(permissionControllerState)) { - captureErrorException( + captureException( new Error( `Migration 40: Invalid PermissionController state error: '${JSON.stringify( permissionControllerState, diff --git a/app/store/migrations/041.ts b/app/store/migrations/041.ts index b0e9843d5a6f..609a66a14d9b 100644 --- a/app/store/migrations/041.ts +++ b/app/store/migrations/041.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to reset state of TokenBalancesController @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TokenBalancesController; if (!isObject(tokenBalancesControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 41: Invalid TokenBalancesController state error: '${JSON.stringify( tokenBalancesControllerState, diff --git a/app/store/migrations/042.ts b/app/store/migrations/042.ts index 4d77144a45f4..1d3032b24849 100644 --- a/app/store/migrations/042.ts +++ b/app/store/migrations/042.ts @@ -1,4 +1,5 @@ import { isObject, hasProperty } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { ValidState, ensureValidState } from './util'; import { AccountsControllerState, @@ -7,14 +8,14 @@ import { import { InternalAccount } from '@metamask/keyring-internal-api'; import { isDefaultAccountName } from '../../util/ENSUtils'; import { ETH_EOA_METHODS } from '../../constants/eth-methods'; -import { captureErrorException } from '../../util/sentry'; + export default function migrate(state: unknown) { if (!ensureValidState(state, 42)) { return state; } if (!isObject(state.engine.backgroundState.AccountsController)) { - captureErrorException( + captureException( new Error( `Migration 42: Invalid AccountsController state: '${typeof state.engine .backgroundState.AccountsController}'`, @@ -29,7 +30,7 @@ export default function migrate(state: unknown) { 'internalAccounts', ) ) { - captureErrorException( + captureException( new Error( `Migration 42: Missing internalAccounts property from AccountsController: '${typeof state .engine.backgroundState.AccountsController}'`, @@ -91,7 +92,7 @@ function mergeInternalAccounts(state: ValidState) { addressMap[selectedAddress] || Object.keys(mergedAccounts)[0]; // Default to the first account in the list accountsController.internalAccounts.accounts = mergedAccounts; if (newSelectedAccountId === undefined) { - captureErrorException( + captureException( new Error( `Migration 42: selectedAccount will be undefined because newSelectedAccountId is undefined. selectedAddress: ${selectedAddress}, addressMap[selectedAddress]: ${addressMap[selectedAddress]}`, ), diff --git a/app/store/migrations/043.ts b/app/store/migrations/043.ts index 928133e24cf4..9abb3ed1d63d 100644 --- a/app/store/migrations/043.ts +++ b/app/store/migrations/043.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import { InfuraNetworkType } from '@metamask/controller-utils'; /** @@ -25,7 +25,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -37,7 +37,7 @@ export default function migrate(state: unknown) { !isObject(networkControllerState.networkConfigurations) || !hasProperty(networkControllerState, 'networkConfigurations') ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController networkConfigurations state: '${typeof networkControllerState.networkConfigurations}'`, ), @@ -53,7 +53,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( networkControllerState.networkConfigurations, ).find(([_, networkConfiguration]) => !isObject(networkConfiguration)); - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController network configuration entry with id: '${ invalidEntry?.[0] @@ -67,7 +67,7 @@ export default function migrate(state: unknown) { !isObject(networkControllerState.providerConfig) || !hasProperty(networkControllerState, 'providerConfig') ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 43: Invalid NetworkController providerConfig state: '${typeof networkControllerState.providerConfig}'`, ), diff --git a/app/store/migrations/044.ts b/app/store/migrations/044.ts index 44d83db98c5b..6d40cd24deb3 100644 --- a/app/store/migrations/044.ts +++ b/app/store/migrations/044.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import { AccountsControllerState } from '@metamask/accounts-controller'; /** @@ -23,7 +23,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.AccountsController; if (!isObject(accountsControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController state error: '${typeof accountsControllerState}'`, ), @@ -35,7 +35,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState, 'internalAccounts') || !isObject(accountsControllerState.internalAccounts) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController internalAccounts state error: '${typeof accountsControllerState.internalAccounts}'`, ), @@ -47,7 +47,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState.internalAccounts, 'accounts') || !isObject(accountsControllerState.internalAccounts.accounts) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController internalAccounts accounts state error: '${typeof accountsControllerState .internalAccounts.accounts}'`, @@ -64,7 +64,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => !isObject(account)); - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController account entry with id: '${ invalidEntry?.[0] @@ -82,7 +82,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => isObject(account) && !isObject(account.metadata)); - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid AccountsController account metadata entry with id: '${ invalidEntry?.[0] @@ -96,7 +96,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PreferencesController; if (!isObject(preferencesControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController state error: '${typeof preferencesControllerState}'`, ), @@ -108,7 +108,7 @@ export default function migrate(state: unknown) { !hasProperty(preferencesControllerState, 'identities') || !isObject(preferencesControllerState.identities) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController identities state error: '${typeof preferencesControllerState.identities}'`, ), @@ -124,7 +124,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( preferencesControllerState.identities, ).find(([_, identity]) => !isObject(identity)); - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 44: Invalid PreferencesController identity entry with type: '${typeof invalidEntry?.[1]}'`, ), diff --git a/app/store/migrations/045.ts b/app/store/migrations/045.ts index 3beca8b78aa6..fa6c6a849a3a 100644 --- a/app/store/migrations/045.ts +++ b/app/store/migrations/045.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to update state of GasFeeController @@ -16,7 +16,7 @@ export default function migrate(state: unknown) { const gasFeeControllerState = state.engine.backgroundState.GasFeeController; if (!isObject(gasFeeControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 45: Invalid GasFeeController state error: '${JSON.stringify( gasFeeControllerState, diff --git a/app/store/migrations/046.ts b/app/store/migrations/046.ts index 684e6a38c602..7ed8b8e3e646 100644 --- a/app/store/migrations/046.ts +++ b/app/store/migrations/046.ts @@ -1,10 +1,11 @@ import { CHAIN_IDS } from '@metamask/transaction-controller'; +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { NetworkType } from '@metamask/controller-utils'; import { LINEA_SEPOLIA_BLOCK_EXPLORER } from '../../../app/constants/urls'; import { ensureValidState } from './util'; import { CHAINLIST_CURRENCY_SYMBOLS_MAP } from '../../constants/network'; -import { captureErrorException } from '../../util/sentry'; + interface NetworkState { providerConfig: { chainId: string; @@ -23,7 +24,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 46: Invalid engine state error: '${typeof state.engine}'`, ), @@ -32,7 +33,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 46: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, @@ -43,7 +44,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 46: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -52,7 +53,7 @@ export default function migrate(state: unknown) { } if (!networkControllerState.providerConfig) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 46: NetworkController providerConfig not found: '${JSON.stringify( networkControllerState.providerConfig, @@ -63,7 +64,7 @@ export default function migrate(state: unknown) { } if (!networkControllerState.providerConfig.chainId) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 46: NetworkController providerConfig chainId not found: '${JSON.stringify( networkControllerState.providerConfig.chainId, diff --git a/app/store/migrations/047.ts b/app/store/migrations/047.ts index 7270dbf7dcfc..77f77f1b21d2 100644 --- a/app/store/migrations/047.ts +++ b/app/store/migrations/047.ts @@ -1,9 +1,9 @@ +import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { ensureValidState } from './util'; import { AccountsControllerState } from '@metamask/accounts-controller'; import { PreferencesState } from '@metamask/preferences-controller'; import { toChecksumHexAddress } from '@metamask/controller-utils'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to add importTime property to accounts metadata of accounts controller @@ -20,7 +20,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.AccountsController; if (!isObject(accountsControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController state error: '${typeof accountsControllerState}'`, ), @@ -32,7 +32,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState, 'internalAccounts') || !isObject(accountsControllerState.internalAccounts) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController internalAccounts state error: '${typeof accountsControllerState.internalAccounts}'`, ), @@ -44,7 +44,7 @@ export default function migrate(state: unknown) { !hasProperty(accountsControllerState.internalAccounts, 'accounts') || !isObject(accountsControllerState.internalAccounts.accounts) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController internalAccounts accounts state error: '${typeof accountsControllerState .internalAccounts.accounts}'`, @@ -61,7 +61,7 @@ export default function migrate(state: unknown) { const invalidEntry = Object.entries( accountsControllerState.internalAccounts.accounts, ).find(([_, account]) => !isObject(account)); - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid AccountsController entry with id: '${ invalidEntry?.[0] @@ -75,7 +75,7 @@ export default function migrate(state: unknown) { .PreferencesController as PreferencesState; if (!isObject(preferencesControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid PreferencesController state error: '${JSON.stringify( preferencesControllerState, @@ -89,7 +89,7 @@ export default function migrate(state: unknown) { !hasProperty(preferencesControllerState, 'identities') || !isObject(preferencesControllerState.identities) ) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 47: Invalid PreferencesController identities state error: '${preferencesControllerState.identities}'`, ), diff --git a/app/store/migrations/048.ts b/app/store/migrations/048.ts index b3982463834c..a2608c190dad 100644 --- a/app/store/migrations/048.ts +++ b/app/store/migrations/048.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to remove contractExchangeRates and contractExchangeRatesByChainId from the state of TokenRatesController @@ -17,7 +17,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.TokenRatesController; if (!isObject(tokenRatesControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 48: Invalid TokenRatesController state error: '${typeof tokenRatesControllerState}'`, ), diff --git a/app/store/migrations/049.ts b/app/store/migrations/049.ts index aa76e208bf01..4c910b5b81bc 100644 --- a/app/store/migrations/049.ts +++ b/app/store/migrations/049.ts @@ -1,5 +1,5 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import { MMKV } from 'react-native-mmkv'; export const storage = new MMKV(); @@ -15,7 +15,7 @@ export default async function migrate(state: unknown) { } await AsyncStorage.removeItem(key); } catch (error) { - captureErrorException( + captureException( new Error( `Failed to migrate key "${key}" from AsyncStorage to MMKV! Error: ${error}`, ), diff --git a/app/store/migrations/050.ts b/app/store/migrations/050.ts index cbc4094f8039..35910871aabd 100644 --- a/app/store/migrations/050.ts +++ b/app/store/migrations/050.ts @@ -1,5 +1,5 @@ import DefaultPreference from 'react-native-default-preference'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; import StorageWrapper from '../storage-wrapper'; /** @@ -18,7 +18,7 @@ export default async function migrate(state: unknown) { } await DefaultPreference.clear(key); } catch (error) { - captureErrorException( + captureException( new Error( `Migration 50: Failed to migrate key "${key}" from DefaultPreference to MMKV! Error: ${error}`, ), diff --git a/app/store/migrations/051.ts b/app/store/migrations/051.ts index 948a91230830..ee5bf3129072 100644 --- a/app/store/migrations/051.ts +++ b/app/store/migrations/051.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to overwrite MATIC token ticker to POL @@ -16,7 +16,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 51: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -25,7 +25,7 @@ export default function migrate(state: unknown) { } if (!isObject(networkControllerState.networkConfigurations)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 51: NetworkController networkConfigurations not found: '${JSON.stringify( networkControllerState.networkConfigurations, @@ -36,7 +36,7 @@ export default function migrate(state: unknown) { } if (!isObject(networkControllerState.providerConfig)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 51: providerConfig not found: '${JSON.stringify( networkControllerState.providerConfig, diff --git a/app/store/migrations/052.ts b/app/store/migrations/052.ts index f48e1dce2d3c..dc3cc8d03f99 100644 --- a/app/store/migrations/052.ts +++ b/app/store/migrations/052.ts @@ -1,7 +1,7 @@ +import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; import { AccountsControllerState } from '@metamask/accounts-controller'; -import { captureErrorException } from '../../util/sentry'; /** * Validates AccountsController state @@ -14,7 +14,7 @@ function isAccountsControllerState( migrationNumber: number, ): state is AccountsControllerState { if (!isObject(state)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: AccountsController state is not an object, type: '${typeof state}'`, ), @@ -23,7 +23,7 @@ function isAccountsControllerState( } if (!hasProperty(state, 'internalAccounts')) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: missing internalAccounts`, ), @@ -32,7 +32,7 @@ function isAccountsControllerState( } if (!isObject(state.internalAccounts)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: internalAccounts is not an object, type: '${typeof state.internalAccounts}'`, ), @@ -41,7 +41,7 @@ function isAccountsControllerState( } if (!hasProperty(state.internalAccounts, 'accounts')) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: missing internalAccounts.accounts`, ), @@ -50,7 +50,7 @@ function isAccountsControllerState( } if (!isObject(state.internalAccounts.accounts)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid AccountsController state error: internalAccounts.accounts is not an object, type: '${typeof state .internalAccounts.accounts}'`, @@ -91,7 +91,7 @@ export const migration52 = (state: unknown, migrationNumber: number) => { (!selectedAccount || (selectedAccount && !accounts[selectedAccount])) ) { if (Object.values(accounts)[0].id === undefined) { - captureErrorException( + captureException( new Error( `Migration 52: selectedAccount will be undefined because Object.values(accounts)[0].id is undefined.`, ), diff --git a/app/store/migrations/053.ts b/app/store/migrations/053.ts index 3f94f92751dd..ef29a2cc7df7 100644 --- a/app/store/migrations/053.ts +++ b/app/store/migrations/053.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 53)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const networkControllerState = state.engine.backgroundState.NetworkController; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 53: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), diff --git a/app/store/migrations/054.ts b/app/store/migrations/054.ts index 27c69e7c0b4c..b26c5dc9aa0f 100644 --- a/app/store/migrations/054.ts +++ b/app/store/migrations/054.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 54)) { @@ -10,7 +10,7 @@ export default function migrate(state: unknown) { const tokensControllerState = state.engine.backgroundState.TokensController; if (!isObject(tokensControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 54: Invalid TokensController state error: '${typeof tokensControllerState}'`, ), diff --git a/app/store/migrations/055.ts b/app/store/migrations/055.ts index 57ef36b96acc..04302aa76590 100644 --- a/app/store/migrations/055.ts +++ b/app/store/migrations/055.ts @@ -1,9 +1,9 @@ +import { captureException } from '@sentry/react-native'; import { TransactionMeta } from '@metamask/transaction-controller'; import { parse, equal } from 'uri-js'; import { SelectedNetworkControllerState } from '@metamask/selected-network-controller'; import { hasProperty, isObject, RuntimeObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export const version = 55; @@ -77,7 +77,7 @@ export default function migrate(state: unknown) { ?.SelectedNetworkController as SelectedNetworkControllerState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${version}: Invalid NetworkController state error: '${typeof networkControllerState}'`, ), @@ -86,7 +86,7 @@ export default function migrate(state: unknown) { } if (!isObject(transactionControllerState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${version}: Invalid TransactionController state error: '${typeof transactionControllerState}'`, ), diff --git a/app/store/migrations/056.ts b/app/store/migrations/056.ts index bb5384953ace..df29f5ba5e63 100644 --- a/app/store/migrations/056.ts +++ b/app/store/migrations/056.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 56)) { @@ -12,7 +12,7 @@ export default function migrate(state: unknown) { state.engine.backgroundState.PreferencesController; if (!isObject(preferencesController)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 56: Invalid PreferencesController state error: '${typeof preferencesController}'`, ), diff --git a/app/store/migrations/058.ts b/app/store/migrations/058.ts index 2352a868c4be..b7708f0fcd69 100644 --- a/app/store/migrations/058.ts +++ b/app/store/migrations/058.ts @@ -1,6 +1,6 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; export default function migrate(state: unknown) { if (!ensureValidState(state, 58)) { @@ -9,7 +9,7 @@ export default function migrate(state: unknown) { } if (!isObject(state.settings)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration 58: Invalid Settings state error: '${typeof state.settings}'`, ), diff --git a/app/store/migrations/059.ts b/app/store/migrations/059.ts index 3b4cec5ede71..8daef82e0f53 100644 --- a/app/store/migrations/059.ts +++ b/app/store/migrations/059.ts @@ -1,7 +1,7 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; import Logger from '../../util/Logger'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; /** * Migration for checking if selectedAccount on AccountsController is undefined @@ -51,7 +51,7 @@ export default function migrate(state: unknown) { `Migration 59: Setting selectedAccount to the id of the first account.`, ); if (firstAccount.id === undefined) { - captureErrorException( + captureException( new Error( `Migration 59: selectedAccount will be undefined because firstAccount.id is undefined.`, ), diff --git a/app/store/migrations/063.ts b/app/store/migrations/063.ts index 0b10145df8c3..5d453db3cc25 100644 --- a/app/store/migrations/063.ts +++ b/app/store/migrations/063.ts @@ -1,11 +1,8 @@ import { isObject } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { ensureValidState } from './util'; -import { - SmartTransactionStatuses, - type SmartTransaction, -} from '@metamask/smart-transactions-controller/dist/types'; +import { SmartTransactionStatuses, type SmartTransaction } from '@metamask/smart-transactions-controller/dist/types'; import { TransactionStatus, CHAIN_IDS } from '@metamask/transaction-controller'; -import { captureErrorException } from '../../util/sentry'; const migrationVersion = 63; @@ -20,13 +17,11 @@ export default function migrate(state: unknown) { return state; } - const transactionControllerState = - state.engine.backgroundState.TransactionController; - const smartTransactionsControllerState = - state.engine.backgroundState.SmartTransactionsController; + const transactionControllerState = state.engine.backgroundState.TransactionController; + const smartTransactionsControllerState = state.engine.backgroundState.SmartTransactionsController; if (!isObject(transactionControllerState)) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Invalid TransactionController state: '${transactionControllerState}'`, ), @@ -35,7 +30,7 @@ export default function migrate(state: unknown) { } if (!isObject(smartTransactionsControllerState)) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Invalid SmartTransactionsController state: '${smartTransactionsControllerState}'`, ), @@ -44,7 +39,7 @@ export default function migrate(state: unknown) { } if (!Array.isArray(transactionControllerState.transactions)) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Missing transactions property from TransactionController: '${typeof state .engine.backgroundState.TransactionController}'`, @@ -52,11 +47,9 @@ export default function migrate(state: unknown) { ); return state; } - const smartTransactions = ( - smartTransactionsControllerState?.smartTransactionsState as SmartTransactionsState - )?.smartTransactions; + const smartTransactions = (smartTransactionsControllerState?.smartTransactionsState as SmartTransactionsState)?.smartTransactions; if (!isObject(smartTransactions)) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Missing smart transactions property from SmartTransactionsController: '${typeof smartTransactionsControllerState?.smartTransactionsState}'`, ), @@ -87,9 +80,7 @@ export default function migrate(state: unknown) { (smartTransaction) => smartTransaction.txHash && smartTransaction.status && - smartTransactionStatusesForUpdate.includes( - smartTransaction.status as SmartTransactionStatuses, - ), + smartTransactionStatusesForUpdate.includes(smartTransaction.status as SmartTransactionStatuses), ) .map((smartTransaction) => smartTransaction.txHash?.toLowerCase()), ); diff --git a/app/store/migrations/064.ts b/app/store/migrations/064.ts index 75094afa391d..048fcbb341cc 100644 --- a/app/store/migrations/064.ts +++ b/app/store/migrations/064.ts @@ -1,3 +1,4 @@ +import { captureException } from '@sentry/react-native'; import { isObject, hasProperty, Hex } from '@metamask/utils'; import { CHAIN_IDS } from '@metamask/transaction-controller'; import { @@ -7,7 +8,7 @@ import { } from '@metamask/network-controller'; import { ensureValidState } from './util'; import { RootState } from '../../reducers'; -import { captureErrorException } from '../../util/sentry'; + /** * This migration checks if `selectedNetworkClientId` exists in any entry within `networkConfigurationsByChainId`. * If it does not, or if `selectedNetworkClientId` is undefined or invalid, it sets `selectedNetworkClientId` to `'mainnet'`. @@ -70,7 +71,7 @@ function isValidNetworkControllerState( !isObject(networkControllerState) || !hasProperty(state.engine.backgroundState, 'NetworkController') ) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Invalid or missing 'NetworkController' in backgroundState: '${typeof networkControllerState}'`, ), @@ -82,7 +83,7 @@ function isValidNetworkControllerState( !hasProperty(networkControllerState, 'networkConfigurationsByChainId') || !isObject(networkControllerState.networkConfigurationsByChainId) ) { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Missing or invalid 'networkConfigurationsByChainId' in NetworkController`, ), @@ -117,7 +118,7 @@ function doesNetworkClientIdExist( return true; } } else { - captureErrorException( + captureException( new Error( `Migration ${migrationVersion}: Invalid network configuration or missing 'rpcEndpoints' for chainId: '${chainId}'`, ), diff --git a/app/store/migrations/065.ts b/app/store/migrations/065.ts index 2c5ecb4039c7..8b020d31f7c4 100644 --- a/app/store/migrations/065.ts +++ b/app/store/migrations/065.ts @@ -1,7 +1,7 @@ +import { captureException } from '@sentry/react-native'; import { isObject, hasProperty } from '@metamask/utils'; import { NetworkState, RpcEndpointType } from '@metamask/network-controller'; import { CHAIN_IDS } from '@metamask/transaction-controller'; -import { captureErrorException } from '../../util/sentry'; /** * Migration to delete Goerli and Linea Goerli configurations if they are Infura types. @@ -12,14 +12,14 @@ export default async function migrate(stateAsync: unknown) { const state = await stateAsync; if (!isObject(state)) { - captureErrorException( + captureException( new Error(`Migration: Invalid root state: '${typeof state}'`), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `Migration: Invalid root engine state: '${typeof state.engine}'`, ), @@ -28,7 +28,7 @@ export default async function migrate(stateAsync: unknown) { } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `Migration: Invalid root engine backgroundState: '${typeof state.engine .backgroundState}'`, @@ -40,7 +40,7 @@ export default async function migrate(stateAsync: unknown) { const networkControllerState = state.engine.backgroundState .NetworkController as NetworkState; if (!isObject(networkControllerState)) { - captureErrorException( + captureException( new Error( `Migration: Invalid NetworkController state: '${typeof networkControllerState}'`, ), @@ -52,7 +52,7 @@ export default async function migrate(stateAsync: unknown) { networkControllerState.networkConfigurationsByChainId; if (!isObject(networkConfigurationsByChainId)) { - captureErrorException( + captureException( new Error( `Migration: Invalid networkConfigurationsByChainId: '${typeof networkConfigurationsByChainId}'`, ), diff --git a/app/store/migrations/066.ts b/app/store/migrations/066.ts index 09722b9a04ae..5d408e9272ac 100644 --- a/app/store/migrations/066.ts +++ b/app/store/migrations/066.ts @@ -10,8 +10,8 @@ import { SolAccountType, SolScope, } from '@metamask/keyring-api'; +import { captureException } from '@sentry/react-native'; import { isBtcMainnetAddress } from '../../core/Multichain/utils'; -import { captureErrorException } from '../../util/sentry'; // Helper to check if a scope is a valid enum value function isValidScope(scope: string): boolean { @@ -49,7 +49,7 @@ function getScopesForAccountType( return [SolScope.Mainnet, SolScope.Testnet, SolScope.Devnet]; default: // Default to EVM namespace for unknown account types - captureErrorException( + captureException( new Error( `Migration ${migrationNumber}: Unknown account type ${account.type}, defaulting to EVM EOA`, ), @@ -92,7 +92,7 @@ export function migration66(state: unknown, migrationNumber: number) { state.engine.backgroundState.AccountsController.internalAccounts.accounts, ) ) { - captureErrorException( + captureException( new Error( `Migration ${migrationNumber}: Invalid state structure for AccountsController`, ), diff --git a/app/store/migrations/068.ts b/app/store/migrations/068.ts index b1ee548d3e26..0cbc6e6baa56 100644 --- a/app/store/migrations/068.ts +++ b/app/store/migrations/068.ts @@ -1,5 +1,5 @@ import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; export interface State { engine: { @@ -17,45 +17,33 @@ export interface State { export default function migrate(state: unknown) { if (!isObject(state)) { - captureErrorException( + captureException( new Error( - `FATAL ERROR: Migration 67: Invalid state error: '${ - state === null ? 'null' : typeof state - }'`, + `FATAL ERROR: Migration 67: Invalid state error: '${state === null ? 'null' : typeof state}'`, ), ); return state; } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( - `FATAL ERROR: Migration 67: Invalid engine state error: '${ - state.engine === null ? 'null' : typeof state.engine - }'`, + `FATAL ERROR: Migration 67: Invalid engine state error: '${state.engine === null ? 'null' : typeof state.engine}'`, ), ); return state; } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( - `FATAL ERROR: Migration 67: Invalid engine backgroundState error: '${ - state.engine.backgroundState === null - ? 'null' - : typeof state.engine.backgroundState - }'`, + `FATAL ERROR: Migration 67: Invalid engine backgroundState error: '${state.engine.backgroundState === null ? 'null' : typeof state.engine.backgroundState}'`, ), ); return state; } if (!isObject(state.engine.backgroundState.PreferencesController)) { - captureErrorException( + captureException( new Error( - `FATAL ERROR: Migration 67: Invalid PreferencesController state error: '${ - state.engine.backgroundState.PreferencesController === null - ? 'null' - : typeof state.engine.backgroundState.PreferencesController - }'`, + `FATAL ERROR: Migration 67: Invalid PreferencesController state error: '${state.engine.backgroundState.PreferencesController === null ? 'null' : typeof state.engine.backgroundState.PreferencesController}'`, ), ); return state; @@ -79,11 +67,11 @@ export default function migrate(state: unknown) { if (currentOptInStatus === true) { // User already had it on - no migration change made preferences.smartTransactionsOptInStatus = true; - preferences.featureFlags.smartTransactionsMigrationApplied = false; // Changed to false + preferences.featureFlags.smartTransactionsMigrationApplied = false; // Changed to false } else { // We're changing their setting - mark as migrated preferences.smartTransactionsOptInStatus = true; - preferences.featureFlags.smartTransactionsMigrationApplied = true; // Changed to true + preferences.featureFlags.smartTransactionsMigrationApplied = true; // Changed to true } preferences.featureFlags.smartTransactionsBannerDismissed = false; diff --git a/app/store/migrations/069.ts b/app/store/migrations/069.ts index 814adc61ce82..efd6e4e53c24 100644 --- a/app/store/migrations/069.ts +++ b/app/store/migrations/069.ts @@ -1,8 +1,8 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from 'lodash'; import { PRICE_API_CURRENCIES } from '../../core/Multichain/constants'; import { ensureValidState } from './util'; import { hasProperty } from '@metamask/utils'; -import { captureErrorException } from '../../util/sentry'; const DEFAULT_CURRENCY = 'usd'; @@ -27,7 +27,7 @@ export default function migrate(state: unknown) { !isObject(currencyController) || !hasProperty(currencyController, 'currentCurrency') ) { - captureErrorException( + captureException( new Error( `Migration: Invalid CurrencyController state type '${typeof currencyController}'`, ), diff --git a/app/store/migrations/070.ts b/app/store/migrations/070.ts index b7ae698ba46b..83b3a45dec01 100644 --- a/app/store/migrations/070.ts +++ b/app/store/migrations/070.ts @@ -1,6 +1,6 @@ import { hasProperty } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; /** * Migration 70: Remove 'staking' reducer data @@ -25,7 +25,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureErrorException( + captureException( new Error( `Migration 070: removing staking key failed with error: ${error}`, ), diff --git a/app/store/migrations/071.ts b/app/store/migrations/071.ts index fdffd23ce8e9..0b8c999a3e5d 100644 --- a/app/store/migrations/071.ts +++ b/app/store/migrations/071.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; +import { captureException } from '@sentry/react-native'; /** * Migration 71: set completedOnboarding based on the state of the KeyringController. @@ -28,7 +28,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureErrorException( + captureException( new Error( `Migration 071: setting completedOnboarding failed with error: ${error}`, ), diff --git a/app/store/migrations/072.ts b/app/store/migrations/072.ts index bf6d5f36c99b..934c231676ad 100644 --- a/app/store/migrations/072.ts +++ b/app/store/migrations/072.ts @@ -1,18 +1,17 @@ +import { captureException } from '@sentry/react-native'; import { hasProperty, isObject } from '@metamask/utils'; -import { - type NetworkConfiguration, - RpcEndpointType, -} from '@metamask/network-controller'; +import { type NetworkConfiguration, RpcEndpointType } from '@metamask/network-controller'; import { ChainId, BuiltInNetworkName, NetworkNickname, BUILT_IN_CUSTOM_NETWORKS_RPC, NetworksTicker, - BlockExplorerUrl, + BlockExplorerUrl } from '@metamask/controller-utils'; + import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; + /** * Migration 72: Add 'MegaEth Testnet' * @@ -44,20 +43,20 @@ const migration = (state: unknown): unknown => { const megaethTestnet = BuiltInNetworkName.MegaETHTestnet; const megaethTestnetChainId = ChainId[megaethTestnet]; const megaethTestnetConfiguration: NetworkConfiguration = { - blockExplorerUrls: [BlockExplorerUrl[megaethTestnet]], - chainId: megaethTestnetChainId, - defaultRpcEndpointIndex: 0, - defaultBlockExplorerUrlIndex: 0, - name: NetworkNickname[megaethTestnet], - nativeCurrency: NetworksTicker[megaethTestnet], - rpcEndpoints: [ - { - failoverUrls: [], - networkClientId: megaethTestnet, - type: RpcEndpointType.Custom, - url: BUILT_IN_CUSTOM_NETWORKS_RPC.MEGAETH_TESTNET, - }, - ], + blockExplorerUrls: [BlockExplorerUrl[megaethTestnet]], + chainId: megaethTestnetChainId, + defaultRpcEndpointIndex: 0, + defaultBlockExplorerUrlIndex: 0, + name: NetworkNickname[megaethTestnet], + nativeCurrency: NetworksTicker[megaethTestnet], + rpcEndpoints: [ + { + failoverUrls: [], + networkClientId: megaethTestnet, + type: RpcEndpointType.Custom, + url: BUILT_IN_CUSTOM_NETWORKS_RPC.MEGAETH_TESTNET, + }, + ], }; // Regardless if the network already exists, we will overwrite it with our default MegaETH configuration. @@ -67,7 +66,7 @@ const migration = (state: unknown): unknown => { } return state; } catch (error) { - captureErrorException( + captureException( new Error( `Migration 072: Adding MegaETH Testnet failed with error: ${error}`, ), diff --git a/app/store/migrations/074.ts b/app/store/migrations/074.ts index 5703b17abf72..34704fd6e2a1 100644 --- a/app/store/migrations/074.ts +++ b/app/store/migrations/074.ts @@ -1,6 +1,6 @@ import { hasProperty, isObject } from '@metamask/utils'; +import { captureException } from '@sentry/react-native'; import { ensureValidState } from './util'; -import { captureErrorException } from '../../util/sentry'; /** * Migration 74: Remove `tokens`, `detectedTokens`, and `ignoredTokens` from `TokensController` @@ -49,7 +49,7 @@ const migration = (state: unknown): unknown => { return state; } catch (error) { - captureErrorException( + captureException( new Error(`Migration ${migrationVersion} failed: ${error}`), ); return state; diff --git a/app/store/migrations/util/index.tsx b/app/store/migrations/util/index.tsx index 69ca7e406dbc..dbc880761234 100644 --- a/app/store/migrations/util/index.tsx +++ b/app/store/migrations/util/index.tsx @@ -1,5 +1,5 @@ +import { captureException } from '@sentry/react-native'; import { isObject } from '@metamask/utils'; -import { captureErrorException } from '../../../util/sentry'; export interface ValidState { engine: { @@ -13,7 +13,7 @@ export function ensureValidState( migrationNumber: number, ): state is T & ValidState { if (!isObject(state)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid state error: '${typeof state}'`, ), @@ -22,7 +22,7 @@ export function ensureValidState( } if (!isObject(state.engine)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid engine state error: '${typeof state.engine}'`, ), @@ -31,7 +31,7 @@ export function ensureValidState( } if (!isObject(state.engine.backgroundState)) { - captureErrorException( + captureException( new Error( `FATAL ERROR: Migration ${migrationNumber}: Invalid engine backgroundState error: '${typeof state .engine.backgroundState}'`, diff --git a/app/util/Logger/index.ts b/app/util/Logger/index.ts index d916abed137f..0a6a77f67062 100644 --- a/app/util/Logger/index.ts +++ b/app/util/Logger/index.ts @@ -1,5 +1,8 @@ -import { addBreadcrumb, withScope } from '@sentry/react-native'; -import { captureErrorException } from '../../util/sentry'; +import { + addBreadcrumb, + captureException, + withScope, +} from '@sentry/react-native'; import StorageWrapper from '../../store/storage-wrapper'; import { METRICS_OPT_IN, AGREED, DEBUG } from '../../constants/storage'; @@ -89,10 +92,10 @@ export class AsyncLogger { typeof extra === 'string' ? { message: extra } : extra; withScope((scope) => { scope.setExtras(extras); - captureErrorException(exception); + captureException(exception); }); } else { - captureErrorException(exception); + captureException(exception); } } } diff --git a/app/util/sentry/index.ts b/app/util/sentry/index.ts deleted file mode 100644 index 5e088c794c5f..000000000000 --- a/app/util/sentry/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { captureException } from '@sentry/react-native'; -import { ExclusiveEventHintOrCaptureContext } from '@sentry/core/build/types/utils/prepareEvent'; - -/** - * Capture an error exception in Sentry - * @param exception - The error exception to capture - * @param hint - The hint to capture the exception with - * @returns The event ID of the captured exception - * - * Report Error for better stack tracing - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors - */ -export function captureErrorException( - exception: Error, - hint?: ExclusiveEventHintOrCaptureContext, -) { - return captureException(exception, hint); -} From ad0ba0cf3fb6636a1759670dbba59b7f50e2b6d5 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 21:54:43 -0700 Subject: [PATCH 13/19] Update podfile.lock --- ios/Podfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 29837d40a0ef..fbfaf702bd70 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2284,7 +2284,7 @@ PODS: - Yoga - RNSensors (5.3.0): - React - - RNSentry (6.10.0): + - RNSentry (6.13.0): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2304,7 +2304,7 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - Sentry/HybridSDK (= 8.48.0) + - Sentry/HybridSDK (= 8.49.2) - Yoga - RNShare (7.3.7): - React-Core @@ -2334,7 +2334,7 @@ PODS: - segment-analytics-react-native (2.20.3): - React-Core - sovran-react-native - - Sentry/HybridSDK (8.48.0) + - Sentry/HybridSDK (8.49.2) - SocketRocket (0.7.1) - sovran-react-native (1.0.4): - React-Core @@ -2943,12 +2943,12 @@ SPEC CHECKSUMS: RNReanimated: e72e05c6e066f1b1760dd61b14773d460980b7d3 RNScreens: f20438755e7efb1812e53baf99041fa17e03b5e9 RNSensors: 4690be00931bc60be7c7bd457701edefaff965e3 - RNSentry: cf99cf22abc943c9843af79368e20f6218dfdeee + RNSentry: 31b7d043bff8fc7ad9b315a2324da49ea3a05e1b RNShare: d03cdc71e750246a48b81dcd62bd792bf57a758e RNSVG: a07e14363aa208062c6483bad24a438d5986d490 RNVectorIcons: 6979cfd2d04844623f2f18ce18139bbc99e95e32 segment-analytics-react-native: 6f98edf18246782ee7428c5380c6519a3d2acf5e - Sentry: 1ca8405451040482877dcd344dfa3ef80b646631 + Sentry: 47021097466aa130802420d485a34da445963d99 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 sovran-react-native: e4721a564ee6ef5b5a0d901bc677018cf371ea01 TcpSockets: 48866ffcb39d7114741919d21069fc90189e474a From 3a3998491afe6948d823652cdb3f7d48178dea20 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 22:39:28 -0700 Subject: [PATCH 14/19] Add @sentry/react as dep --- package.json | 3 ++- yarn.lock | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 432c6eba7e58..22debb9bd680 100644 --- a/package.json +++ b/package.json @@ -253,9 +253,10 @@ "@reown/walletkit": "^1.2.3", "@segment/analytics-react-native": "^2.20.3", "@segment/sovran-react-native": "^1.0.4", - "@sentry/react-native": "^6.10.0", "@sentry/browser": "^8.54.0", "@sentry/core": "^8.54.0", + "@sentry/react": "^8.54.0", + "@sentry/react-native": "^6.10.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", "@tradle/react-native-http": "2.0.1", diff --git a/yarn.lock b/yarn.lock index 3db27de7051b..d1b668031c36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7676,7 +7676,7 @@ "@sentry-internal/replay-canvas" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/browser@^8.54.0": +"@sentry/browser@8.55.0", "@sentry/browser@^8.54.0": version "8.55.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.55.0.tgz#9a489e2a54d29c65e6271b4ee594b43679cab7bd" integrity sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw== @@ -7779,6 +7779,15 @@ "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" +"@sentry/react@^8.54.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.55.0.tgz#309f005837956a98e79275ef8c2c2b5952c8be93" + integrity sha512-/qNBvFLpvSa/Rmia0jpKfJdy16d4YZaAnH/TuKLAtm0BWlsPQzbXCU4h8C5Hsst0Do0zG613MEtEmWpWrVOqWA== + dependencies: + "@sentry/browser" "8.55.0" + "@sentry/core" "8.55.0" + hoist-non-react-statics "^3.3.2" + "@sentry/types@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36" From b420fddc9501b6a29e6748a65b19ae1f276f9385 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 22:47:10 -0700 Subject: [PATCH 15/19] Declare types for @sentry/react-native for captureException --- app/declarations/index.d.ts | 113 ++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/app/declarations/index.d.ts b/app/declarations/index.d.ts index aa91f35967bf..a7cfe148d3af 100644 --- a/app/declarations/index.d.ts +++ b/app/declarations/index.d.ts @@ -295,3 +295,116 @@ declare module '@metamask/react-native-actionsheet' { } declare module '@metamask/react-native-search-api'; + +/** + * @sentry/react-native types for v^6.10.0 + * Types are overridden to ensure captureException receives an Error type for more reliable stack traces + * Reference - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors + */ +declare module '@sentry/react-native' { + export type { + Breadcrumb, + Request, + SdkInfo, + Event, + Exception, + SendFeedbackParams, + SeverityLevel, + Span, + StackFrame, + Stacktrace, + Thread, + User, + UserFeedback, + } from '@sentry/core'; + + export { + addBreadcrumb, + captureEvent, + captureFeedback, + captureMessage, + Scope, + setContext, + setExtra, + setExtras, + setTag, + setTags, + setUser, + startInactiveSpan, + startSpan, + startSpanManual, + getActiveSpan, + getRootSpan, + withActiveSpan, + suppressTracing, + spanToJSON, + spanIsSampled, + setMeasurement, + getCurrentScope, + getGlobalScope, + getIsolationScope, + getClient, + setCurrentClient, + addEventProcessor, + metricsDefault as metrics, + lastEventId, + } from '@sentry/core'; + + export { + ErrorBoundary, + withErrorBoundary, + createReduxEnhancer, + Profiler, + useProfiler, + withProfiler, + } from '@sentry/react'; + + export * from '@sentry/react-native/dist/js/integrations/exports'; + export { SDK_NAME, SDK_VERSION } from '@sentry/react-native/dist/js/version'; + export type { ReactNativeOptions } from '@sentry/react-native/dist/js/options'; + export { ReactNativeClient } from '@sentry/react-native/dist/js/client'; + export { + init, + wrap, + nativeCrash, + flush, + close, + captureUserFeedback, + withScope, + crashedLastRun, + } from '@sentry/react-native/dist/js/sdk'; + export { + TouchEventBoundary, + withTouchEventBoundary, + } from '@sentry/react-native/dist/js/touchevents'; + export { + reactNativeTracingIntegration, + getCurrentReactNativeTracingIntegration, + getReactNativeTracingIntegration, + reactNavigationIntegration, + reactNativeNavigationIntegration, + sentryTraceGesture, + TimeToInitialDisplay, + TimeToFullDisplay, + startTimeToInitialDisplaySpan, + startTimeToFullDisplaySpan, + startIdleNavigationSpan, + startIdleSpan, + getDefaultIdleNavigationSpanOptions, + createTimeToFullDisplay, + createTimeToInitialDisplay, + } from '@sentry/react-native/dist/js/tracing'; + export type { TimeToDisplayProps } from '@sentry/react-native/dist/js/tracing'; + export { Mask, Unmask } from '@sentry/react-native/dist/js/replay/CustomMask'; + export { FeedbackWidget } from '@sentry/react-native/dist/js/feedback/FeedbackWidget'; + export { showFeedbackWidget } from '@sentry/react-native/dist/js/feedback/FeedbackWidgetManager'; + export { getDataFromUri } from '@sentry/react-native/dist/js/wrapper'; + + // Enforce exception to be of type Error for more reliable stack traces - https://docs.sentry.io/platforms/javascript/usage/#capturing-errors + import { ExclusiveEventHintOrCaptureContext } from '@sentry/core/build/types/utils/prepareEvent'; + const captureException: ( + exception: Error, + hint?: ExclusiveEventHintOrCaptureContext, + ) => string; + export { captureException }; +} From 92a08a9c952d0e723e31853c7cf13c0309de8b16 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 23:14:41 -0700 Subject: [PATCH 16/19] Remove @sentry/react dep from package.json --- package.json | 1 - yarn.lock | 11 +---------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/package.json b/package.json index 22debb9bd680..89a793d9c470 100644 --- a/package.json +++ b/package.json @@ -255,7 +255,6 @@ "@segment/sovran-react-native": "^1.0.4", "@sentry/browser": "^8.54.0", "@sentry/core": "^8.54.0", - "@sentry/react": "^8.54.0", "@sentry/react-native": "^6.10.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", diff --git a/yarn.lock b/yarn.lock index d1b668031c36..3db27de7051b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7676,7 +7676,7 @@ "@sentry-internal/replay-canvas" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/browser@8.55.0", "@sentry/browser@^8.54.0": +"@sentry/browser@^8.54.0": version "8.55.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.55.0.tgz#9a489e2a54d29c65e6271b4ee594b43679cab7bd" integrity sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw== @@ -7779,15 +7779,6 @@ "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" -"@sentry/react@^8.54.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.55.0.tgz#309f005837956a98e79275ef8c2c2b5952c8be93" - integrity sha512-/qNBvFLpvSa/Rmia0jpKfJdy16d4YZaAnH/TuKLAtm0BWlsPQzbXCU4h8C5Hsst0Do0zG613MEtEmWpWrVOqWA== - dependencies: - "@sentry/browser" "8.55.0" - "@sentry/core" "8.55.0" - hoist-non-react-statics "^3.3.2" - "@sentry/types@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36" From e86b8aedd5b18819af0af8330ec2997725245b29 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 23:33:45 -0700 Subject: [PATCH 17/19] Revert "Remove @sentry/react dep from package.json" This reverts commit 92a08a9c952d0e723e31853c7cf13c0309de8b16. --- package.json | 1 + yarn.lock | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 89a793d9c470..22debb9bd680 100644 --- a/package.json +++ b/package.json @@ -255,6 +255,7 @@ "@segment/sovran-react-native": "^1.0.4", "@sentry/browser": "^8.54.0", "@sentry/core": "^8.54.0", + "@sentry/react": "^8.54.0", "@sentry/react-native": "^6.10.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", diff --git a/yarn.lock b/yarn.lock index 3db27de7051b..d1b668031c36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7676,7 +7676,7 @@ "@sentry-internal/replay-canvas" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/browser@^8.54.0": +"@sentry/browser@8.55.0", "@sentry/browser@^8.54.0": version "8.55.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.55.0.tgz#9a489e2a54d29c65e6271b4ee594b43679cab7bd" integrity sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw== @@ -7779,6 +7779,15 @@ "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" +"@sentry/react@^8.54.0": + version "8.55.0" + resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.55.0.tgz#309f005837956a98e79275ef8c2c2b5952c8be93" + integrity sha512-/qNBvFLpvSa/Rmia0jpKfJdy16d4YZaAnH/TuKLAtm0BWlsPQzbXCU4h8C5Hsst0Do0zG613MEtEmWpWrVOqWA== + dependencies: + "@sentry/browser" "8.55.0" + "@sentry/core" "8.55.0" + hoist-non-react-statics "^3.3.2" + "@sentry/types@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36" From cb96adbffca640eebb3a4ac9d1da2953ee725596 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 23:35:47 -0700 Subject: [PATCH 18/19] Ignore @sentry/react for depcheck --- .depcheckrc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.depcheckrc.yml b/.depcheckrc.yml index e528c0735287..894303b9a498 100644 --- a/.depcheckrc.yml +++ b/.depcheckrc.yml @@ -8,6 +8,8 @@ ignores: - '@lavamoat/allow-scripts' - '@lavamoat/git-safe-dependencies' - 'babel-plugin-inline-import' + # This is used in index.d.ts + - '@sentry/react' # This is used on the patch for TokenRatesController of Assets controllers, for we to be able to use the last version of it - cockatiel From 2a9cb1b11e63abcdabf27fecf0200b4402d969c4 Mon Sep 17 00:00:00 2001 From: Cal-L Date: Thu, 1 May 2025 23:53:09 -0700 Subject: [PATCH 19/19] Lock sentry versions to minor versions --- ios/Podfile.lock | 10 +-- package.json | 8 +-- yarn.lock | 181 ++++++++++++++++------------------------------- 3 files changed, 69 insertions(+), 130 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index fbfaf702bd70..29837d40a0ef 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -2284,7 +2284,7 @@ PODS: - Yoga - RNSensors (5.3.0): - React - - RNSentry (6.13.0): + - RNSentry (6.10.0): - DoubleConversion - glog - RCT-Folly (= 2024.10.14.00) @@ -2304,7 +2304,7 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - Sentry/HybridSDK (= 8.49.2) + - Sentry/HybridSDK (= 8.48.0) - Yoga - RNShare (7.3.7): - React-Core @@ -2334,7 +2334,7 @@ PODS: - segment-analytics-react-native (2.20.3): - React-Core - sovran-react-native - - Sentry/HybridSDK (8.49.2) + - Sentry/HybridSDK (8.48.0) - SocketRocket (0.7.1) - sovran-react-native (1.0.4): - React-Core @@ -2943,12 +2943,12 @@ SPEC CHECKSUMS: RNReanimated: e72e05c6e066f1b1760dd61b14773d460980b7d3 RNScreens: f20438755e7efb1812e53baf99041fa17e03b5e9 RNSensors: 4690be00931bc60be7c7bd457701edefaff965e3 - RNSentry: 31b7d043bff8fc7ad9b315a2324da49ea3a05e1b + RNSentry: cf99cf22abc943c9843af79368e20f6218dfdeee RNShare: d03cdc71e750246a48b81dcd62bd792bf57a758e RNSVG: a07e14363aa208062c6483bad24a438d5986d490 RNVectorIcons: 6979cfd2d04844623f2f18ce18139bbc99e95e32 segment-analytics-react-native: 6f98edf18246782ee7428c5380c6519a3d2acf5e - Sentry: 47021097466aa130802420d485a34da445963d99 + Sentry: 1ca8405451040482877dcd344dfa3ef80b646631 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 sovran-react-native: e4721a564ee6ef5b5a0d901bc677018cf371ea01 TcpSockets: 48866ffcb39d7114741919d21069fc90189e474a diff --git a/package.json b/package.json index 22debb9bd680..1155965d2e06 100644 --- a/package.json +++ b/package.json @@ -253,10 +253,10 @@ "@reown/walletkit": "^1.2.3", "@segment/analytics-react-native": "^2.20.3", "@segment/sovran-react-native": "^1.0.4", - "@sentry/browser": "^8.54.0", - "@sentry/core": "^8.54.0", - "@sentry/react": "^8.54.0", - "@sentry/react-native": "^6.10.0", + "@sentry/browser": "~8.54.0", + "@sentry/core": "~8.54.0", + "@sentry/react": "~8.54.0", + "@sentry/react-native": "~6.10.0", "@shopify/flash-list": "^1.7.6", "@solana/addresses": "2.0.0", "@tradle/react-native-http": "2.0.1", diff --git a/yarn.lock b/yarn.lock index d1b668031c36..84bb26605f87 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7607,13 +7607,6 @@ dependencies: "@sentry/core" "8.54.0" -"@sentry-internal/browser-utils@8.55.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.55.0.tgz#d89bae423edd29c39f01285c8e2d59ce9289d9a6" - integrity sha512-ROgqtQfpH/82AQIpESPqPQe0UyWywKJsmVIqi3c5Fh+zkds5LUxnssTj3yNd1x+kxaPDVB023jAP+3ibNgeNDw== - dependencies: - "@sentry/core" "8.55.0" - "@sentry-internal/feedback@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.54.0.tgz#52c3a63aa5b520eca7acfa1376621e8441984126" @@ -7621,13 +7614,6 @@ dependencies: "@sentry/core" "8.54.0" -"@sentry-internal/feedback@8.55.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.55.0.tgz#170b8e96a36ce6f71f53daad680f1a0c98381314" - integrity sha512-cP3BD/Q6pquVQ+YL+rwCnorKuTXiS9KXW8HNKu4nmmBAyf7urjs+F6Hr1k9MXP5yQ8W3yK7jRWd09Yu6DHWOiw== - dependencies: - "@sentry/core" "8.55.0" - "@sentry-internal/replay-canvas@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.54.0.tgz#e57a3893db2bb0ea7ad9dc2a804bb035142fe3ba" @@ -7636,14 +7622,6 @@ "@sentry-internal/replay" "8.54.0" "@sentry/core" "8.54.0" -"@sentry-internal/replay-canvas@8.55.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.55.0.tgz#e65430207a2f18e4a07c25c669ec758d11282aaf" - integrity sha512-nIkfgRWk1091zHdu4NbocQsxZF1rv1f7bbp3tTIlZYbrH62XVZosx5iHAuZG0Zc48AETLE7K4AX9VGjvQj8i9w== - dependencies: - "@sentry-internal/replay" "8.55.0" - "@sentry/core" "8.55.0" - "@sentry-internal/replay@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.54.0.tgz#b92990a51ffbe8d92998ff8188db9e3a6f9d1e18" @@ -7652,20 +7630,12 @@ "@sentry-internal/browser-utils" "8.54.0" "@sentry/core" "8.54.0" -"@sentry-internal/replay@8.55.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.55.0.tgz#4c00b22cdf58cac5b3e537f8d4f675f2b021f475" - integrity sha512-roCDEGkORwolxBn8xAKedybY+Jlefq3xYmgN2fr3BTnsXjSYOPC7D1/mYqINBat99nDtvgFvNfRcZPiwwZ1hSw== - dependencies: - "@sentry-internal/browser-utils" "8.55.0" - "@sentry/core" "8.55.0" - -"@sentry/babel-plugin-component-annotate@3.3.1": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.3.1.tgz#baecd89396cbb4659565a4e8efe7f0a71b19262a" - integrity sha512-5GOxGT7lZN+I8A7Vp0rWY+726FDKEw8HnFiebe51rQrMbfGfCu2Aw9uSM0nT9OG6xhV6WvGccIcCszTPs4fUZQ== +"@sentry/babel-plugin-component-annotate@3.2.2": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.2.2.tgz#0c5f26e417b8f524924fa4531b82ad5603216e90" + integrity sha512-D+SKQ266ra/wo87s9+UI/rKQi3qhGPCR8eSCDe0VJudhjHsqyNU+JJ5lnIGCgmZaWFTXgdBP/gdr1Iz1zqGs4Q== -"@sentry/browser@8.54.0": +"@sentry/browser@8.54.0", "@sentry/browser@~8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.54.0.tgz#5487075908aac564892e689e1b6d233fdb314f5b" integrity sha512-BgUtvxFHin0fS0CmJVKTLXXZcke0Av729IVfi+2fJ4COX8HO7/HAP02RKaSQGmL2HmvWYTfNZ7529AnUtrM4Rg== @@ -7676,61 +7646,45 @@ "@sentry-internal/replay-canvas" "8.54.0" "@sentry/core" "8.54.0" -"@sentry/browser@8.55.0", "@sentry/browser@^8.54.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.55.0.tgz#9a489e2a54d29c65e6271b4ee594b43679cab7bd" - integrity sha512-1A31mCEWCjaMxJt6qGUK+aDnLDcK6AwLAZnqpSchNysGni1pSn1RWSmk9TBF8qyTds5FH8B31H480uxMPUJ7Cw== - dependencies: - "@sentry-internal/browser-utils" "8.55.0" - "@sentry-internal/feedback" "8.55.0" - "@sentry-internal/replay" "8.55.0" - "@sentry-internal/replay-canvas" "8.55.0" - "@sentry/core" "8.55.0" - -"@sentry/cli-darwin@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.43.1.tgz#356ea4d334a373a87927393f1ff9b047dee99185" - integrity sha512-622g/UyhTi1zC0Nnnbto75gNkExwwjv1cnRA4ERwfPgiOI3UK0/j+m4CcosqrfdTK55pv+SiifOlmvDPZnMIZw== - -"@sentry/cli-linux-arm64@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.43.1.tgz#02918f83d962a9af279dbce0eab6bd2fa57ac033" - integrity sha512-c1P7eZqdDwRlePBSQSgWYUi80W5ywvG/XxZFVecjdHDEYlo2BJTRirqZTqzKzI/Ekk8x5hOxNuBbP+m9FluDMw== - -"@sentry/cli-linux-arm@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.43.1.tgz#e7bf2c71b6f376581b08034f7d410b3492314c52" - integrity sha512-eQKcfqMR9bg8HKR9UCwm8x3lGBMUu1wCQow2BwEX4NbY1GzniSHNH4MBY2ERpOsfCA0LM5xEWQk/QFXexz1Dhw== - -"@sentry/cli-linux-i686@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.43.1.tgz#ae495afe985f2b9738ec8277cf84361d6ead1501" - integrity sha512-VRhzmEOeA/nsQHkf3Jt8mbgZmdbAWURM18Y1uXVRI/mQzZaz6YAZ+IzQ6gANpUk+UfTdf1q0unZSAIOUuu19gA== - -"@sentry/cli-linux-x64@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.43.1.tgz#05a245a995387197f327251674069c553a3f53b6" - integrity sha512-c8G4zdzxzdPOz+tV1LNwUz5UsPNnhEE13kMPesF81liawwznnBsDfeKf6t/87Eem4BgAPdsFlnqnffi4BdqkZQ== - -"@sentry/cli-win32-arm64@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.43.1.tgz#5fdea8285998e6915a0588ebceed87a0afb2a05c" - integrity sha512-K+9td351lzUn51R/oHotyEkq7nzKWBm2ffhVAe4HXNh72MjhyIvonAhQUrGawIjn/aLHO+hq9iNaEXbCu6Hulg== - -"@sentry/cli-win32-i686@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.43.1.tgz#42907778a1352a87ebe7f1de8d098cb82a7a447f" - integrity sha512-Co7kj0o16xcUZRZY+VwMgpdDvOY2xAbR5Xg5NXv73nXdALgGWf+G5bntFz3baNmaSOYWKJjvZT7a+YLwe/DihQ== - -"@sentry/cli-win32-x64@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.43.1.tgz#a26e161e2ce3e3b7e262e4da197c3905b6f291c9" - integrity sha512-uH7l4FXc6s0GoJeriU6kQOYzREqDGB7b16XbTKY+lnhMNvBgP2aaOUQ9yRLbEHeSSg/112SQeolCnF2GwTmoKw== - -"@sentry/cli@2.43.1": - version "2.43.1" - resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.43.1.tgz#8b34d2b24d661aef55395a40ac72413a813a626d" - integrity sha512-5jg8cy4LlPnmgI6FkxClDRB5hFWzmlq7VZqj5o6Zdm5KRywzCn2s18GXyC1LPf6MFHw3AZ/K2h5pUZmJdWUBFQ== +"@sentry/cli-darwin@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-darwin/-/cli-darwin-2.42.4.tgz#029521d3052c644e3bac1c926e53d1e658b8cb28" + integrity sha512-PZV4Y97VDWBR4rIt0HkJfXaBXlebIN2s/FDzC3iHINZE5OG62CDFsnC4/lbGlf2/UZLDaGGIK7mYwSHhTvN+HQ== + +"@sentry/cli-linux-arm64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.42.4.tgz#b5e2d2399764998e3d661f144aae0c3f3495d1f1" + integrity sha512-Ex8vRnryyzC/9e43daEmEqPS+9uirY/l6Hw2lAvhBblFaL7PTWNx52H+8GnYGd9Zy2H3rWNyBDYfHwnErg38zA== + +"@sentry/cli-linux-arm@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-arm/-/cli-linux-arm-2.42.4.tgz#286996c3969a553c07a74a2a67c6d3671e2c79b5" + integrity sha512-lBn0oeeg62h68/4Eo6zbPq99Idz5t0VRV48rEU/WKeM4MtQCvG/iGGQ3lBFW2yNiUBzXZIK9poXLEcgbwmcRVw== + +"@sentry/cli-linux-i686@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-i686/-/cli-linux-i686-2.42.4.tgz#03e72598dc37e96a99e4329e20db9e74df277f83" + integrity sha512-IBJg0aHjsLCL4LvcFa3cXIjA+4t5kPqBT9y+PoDu4goIFxYD8zl7mbUdGJutvJafTk8Akf4ss4JJXQBjg019zA== + +"@sentry/cli-linux-x64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-linux-x64/-/cli-linux-x64-2.42.4.tgz#a3bc31a909f61029620e5d2ae0f8d8625ed8982a" + integrity sha512-gXI5OEiOSNiAEz7VCE6AZcAgHJ47mlgal3+NmbE8XcHmFOnyDws9FNie6PJAy8KZjXi3nqoBP9JVAbnmOix3uA== + +"@sentry/cli-win32-i686@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-i686/-/cli-win32-i686-2.42.4.tgz#0de663fc574f4bce2057e099c5b76b65f99a3bd6" + integrity sha512-vZuR3UPHKqOMniyrijrrsNwn9usaRysXq78F6WV0cL0ZyPLAmY+KBnTDSFk1Oig2pURnzaTm+RtcZu2fc8mlzg== + +"@sentry/cli-win32-x64@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli-win32-x64/-/cli-win32-x64-2.42.4.tgz#f572a03084f3b1a4f355c1fbeb1339cb56ad91c9" + integrity sha512-OIBj3uaQ6nAERSm5Dcf8UIhyElEEwMNsZEEppQpN4IKl0mrwb/57AznM23Dvpu6GR8WGbVQUSolt879YZR5E9g== + +"@sentry/cli@2.42.4": + version "2.42.4" + resolved "https://registry.yarnpkg.com/@sentry/cli/-/cli-2.42.4.tgz#df6ac3e92a60a715b231873433894ed77e601086" + integrity sha512-BoSZDAWJiz/40tu6LuMDkSgwk4xTsq6zwqYoUqLU3vKBR/VsaaQGvu6EWxZXORthfZU2/5Agz0+t220cge6VQw== dependencies: https-proxy-agent "^5.0.0" node-fetch "^2.6.7" @@ -7738,39 +7692,33 @@ proxy-from-env "^1.1.0" which "^2.0.2" optionalDependencies: - "@sentry/cli-darwin" "2.43.1" - "@sentry/cli-linux-arm" "2.43.1" - "@sentry/cli-linux-arm64" "2.43.1" - "@sentry/cli-linux-i686" "2.43.1" - "@sentry/cli-linux-x64" "2.43.1" - "@sentry/cli-win32-arm64" "2.43.1" - "@sentry/cli-win32-i686" "2.43.1" - "@sentry/cli-win32-x64" "2.43.1" - -"@sentry/core@8.54.0": + "@sentry/cli-darwin" "2.42.4" + "@sentry/cli-linux-arm" "2.42.4" + "@sentry/cli-linux-arm64" "2.42.4" + "@sentry/cli-linux-i686" "2.42.4" + "@sentry/cli-linux-x64" "2.42.4" + "@sentry/cli-win32-i686" "2.42.4" + "@sentry/cli-win32-x64" "2.42.4" + +"@sentry/core@8.54.0", "@sentry/core@~8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.54.0.tgz#a2ebec965cadcb6de89e116689feeef79d5862a6" integrity sha512-03bWf+D1j28unOocY/5FDB6bUHtYlm6m6ollVejhg45ZmK9iPjdtxNWbrLsjT1WRym0Tjzowu+A3p+eebYEv0Q== -"@sentry/core@8.55.0", "@sentry/core@^8.54.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.55.0.tgz#4964920229fcf649237ef13b1533dfc4b9f6b22e" - integrity sha512-6g7jpbefjHYs821Z+EBJ8r4Z7LT5h80YSWRJaylGS4nW5W5Z2KXzpdnyFarv37O7QjauzVC2E+PABmpkw5/JGA== - -"@sentry/react-native@^6.10.0": - version "6.13.0" - resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-6.13.0.tgz#f2f16ad04fceaed9d3fc9e4c6f3ccac46efe315e" - integrity sha512-SO43OMODWZr+pIl5HnUoRTAqAPK8sMXedLKnrGneZHp7UjkoX+tAYtkvuFjthPgv50ngHlyvxYsdv2X8dAMtfw== +"@sentry/react-native@~6.10.0": + version "6.10.0" + resolved "https://registry.yarnpkg.com/@sentry/react-native/-/react-native-6.10.0.tgz#9efafb9b85870bd4c5189763edde30709b9f3213" + integrity sha512-B56vc+pnFHMiu3cabFb454v4qD0zObW6JVzJ5Gb6fIMdt93AFIJg10ZErzC+ump7xM4BOEROFFRuLiyvadvlPA== dependencies: - "@sentry/babel-plugin-component-annotate" "3.3.1" + "@sentry/babel-plugin-component-annotate" "3.2.2" "@sentry/browser" "8.54.0" - "@sentry/cli" "2.43.1" + "@sentry/cli" "2.42.4" "@sentry/core" "8.54.0" "@sentry/react" "8.54.0" "@sentry/types" "8.54.0" "@sentry/utils" "8.54.0" -"@sentry/react@8.54.0": +"@sentry/react@8.54.0", "@sentry/react@~8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.54.0.tgz#16cec103b5d5697bdfebacf6e2d35f19699b3ab3" integrity sha512-42T/fp8snYN19Fy/2P0Mwotu4gcdy+1Lx+uYCNcYP1o7wNGigJ7qb27sW7W34GyCCHjoCCfQgeOqDQsyY8LC9w== @@ -7779,15 +7727,6 @@ "@sentry/core" "8.54.0" hoist-non-react-statics "^3.3.2" -"@sentry/react@^8.54.0": - version "8.55.0" - resolved "https://registry.yarnpkg.com/@sentry/react/-/react-8.55.0.tgz#309f005837956a98e79275ef8c2c2b5952c8be93" - integrity sha512-/qNBvFLpvSa/Rmia0jpKfJdy16d4YZaAnH/TuKLAtm0BWlsPQzbXCU4h8C5Hsst0Do0zG613MEtEmWpWrVOqWA== - dependencies: - "@sentry/browser" "8.55.0" - "@sentry/core" "8.55.0" - hoist-non-react-statics "^3.3.2" - "@sentry/types@8.54.0": version "8.54.0" resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.54.0.tgz#1d57bb094443081de4e0d8b638e6ebc40f5ddd36"