From b65415aec4aff487e1ad4c99daf7ba7cd836b4f6 Mon Sep 17 00:00:00 2001 From: Nodonisko Date: Tue, 14 Jan 2025 14:01:18 +0100 Subject: [PATCH] fix(mobile): update and patch reanimated to fix crash --- patches/react-native-reanimated+3.16.7.patch | 19 +++++++ suite-native/accounts/package.json | 2 +- suite-native/alerts/package.json | 2 +- suite-native/app/package.json | 2 +- suite-native/assets/package.json | 2 +- suite-native/atoms/package.json | 2 +- suite-native/coin-enabling/package.json | 2 +- suite-native/device-manager/package.json | 2 +- suite-native/device/package.json | 2 +- suite-native/firmware/package.json | 2 +- suite-native/graph/package.json | 2 +- suite-native/icons/package.json | 2 +- suite-native/message-system/package.json | 2 +- .../module-accounts-import/package.json | 2 +- .../module-authorize-device/package.json | 2 +- suite-native/module-send/package.json | 2 +- suite-native/navigation/package.json | 2 +- suite-native/notifications/package.json | 2 +- suite-native/react-native-graph/package.json | 2 +- suite-native/receive/package.json | 2 +- suite-native/toasts/package.json | 2 +- suite-native/transactions/package.json | 2 +- suite-native/video-assets/package.json | 2 +- yarn.lock | 52 +++++++++---------- 24 files changed, 67 insertions(+), 48 deletions(-) create mode 100644 patches/react-native-reanimated+3.16.7.patch diff --git a/patches/react-native-reanimated+3.16.7.patch b/patches/react-native-reanimated+3.16.7.patch new file mode 100644 index 00000000000..39ff71b4023 --- /dev/null +++ b/patches/react-native-reanimated+3.16.7.patch @@ -0,0 +1,19 @@ +diff --git a/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java b/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +index 15afbed..5a4f50e 100644 +--- a/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java ++++ b/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/layoutReanimation/AnimationsManager.java +@@ -102,9 +102,11 @@ public class AnimationsManager implements ViewHierarchyObserver { + return; + } + +- AndroidUIScheduler androidUIScheduler = mWeakAndroidUIScheduler.get(); +- if (androidUIScheduler != null) { +- androidUIScheduler.triggerUI(); ++ if (mWeakAndroidUIScheduler != null) { ++ AndroidUIScheduler androidUIScheduler = mWeakAndroidUIScheduler.get(); ++ if (androidUIScheduler != null) { ++ androidUIScheduler.triggerUI(); ++ } + } + int tag = view.getId(); + HashMap targetValues = after.toTargetMap(); diff --git a/suite-native/accounts/package.json b/suite-native/accounts/package.json index c4099b407c7..ccd8e6508d7 100644 --- a/suite-native/accounts/package.json +++ b/suite-native/accounts/package.json @@ -40,7 +40,7 @@ "react": "18.2.0", "react-hook-form": "^7.54.2", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/alerts/package.json b/suite-native/alerts/package.json index a85f8afe114..d7bfc38302b 100644 --- a/suite-native/alerts/package.json +++ b/suite-native/alerts/package.json @@ -17,6 +17,6 @@ "jotai": "1.9.1", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1" + "react-native-reanimated": "^3.16.7" } } diff --git a/suite-native/app/package.json b/suite-native/app/package.json index f65d33e9f05..14a57ec4e61 100644 --- a/suite-native/app/package.json +++ b/suite-native/app/package.json @@ -113,7 +113,7 @@ "react-native-keyboard-aware-scroll-view": "0.9.5", "react-native-mmkv": "2.12.2", "react-native-quick-crypto": "^0.7.6", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-restart": "0.0.27", "react-native-safe-area-context": "^4.14.0", "react-native-screens": "^4.0.0", diff --git a/suite-native/assets/package.json b/suite-native/assets/package.json index 0e9591708db..355bc0ad0f6 100644 --- a/suite-native/assets/package.json +++ b/suite-native/assets/package.json @@ -30,7 +30,7 @@ "@suite-native/tokens": "workspace:*", "react": "^18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/atoms/package.json b/suite-native/atoms/package.json index d346e5a93cf..98c59091811 100644 --- a/suite-native/atoms/package.json +++ b/suite-native/atoms/package.json @@ -29,7 +29,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-gesture-handler": "^2.21.0", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "^4.14.0", "react-native-svg": "15.9.0" } diff --git a/suite-native/coin-enabling/package.json b/suite-native/coin-enabling/package.json index 6baa3534400..cbd354c87b1 100644 --- a/suite-native/coin-enabling/package.json +++ b/suite-native/coin-enabling/package.json @@ -30,7 +30,7 @@ "expo-linear-gradient": "^14.0.1", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-svg": "^15.9.0", "react-redux": "8.0.7" } diff --git a/suite-native/device-manager/package.json b/suite-native/device-manager/package.json index d7e4cb7c5b4..ec95a46e5e5 100644 --- a/suite-native/device-manager/package.json +++ b/suite-native/device-manager/package.json @@ -30,7 +30,7 @@ "jotai": "1.9.1", "react": "^18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "^4.14.0", "react-redux": "8.0.7" } diff --git a/suite-native/device/package.json b/suite-native/device/package.json index 78bc591abe9..bd836f04ccb 100644 --- a/suite-native/device/package.json +++ b/suite-native/device/package.json @@ -33,7 +33,7 @@ "lottie-react-native": "^7.1.0", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7", "semver": "^7.6.3" } diff --git a/suite-native/firmware/package.json b/suite-native/firmware/package.json index 2b40d2d752e..9631e5ba4a8 100644 --- a/suite-native/firmware/package.json +++ b/suite-native/firmware/package.json @@ -22,7 +22,7 @@ "@trezor/styles": "workspace:*", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "4.14.0", "react-redux": "8.0.7" } diff --git a/suite-native/graph/package.json b/suite-native/graph/package.json index 64a203c42fc..22a479740c3 100644 --- a/suite-native/graph/package.json +++ b/suite-native/graph/package.json @@ -40,7 +40,7 @@ "jotai": "1.9.1", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7", "redux-persist": "6.0.0" } diff --git a/suite-native/icons/package.json b/suite-native/icons/package.json index c47a0bde7bd..a3037d2c446 100644 --- a/suite-native/icons/package.json +++ b/suite-native/icons/package.json @@ -22,6 +22,6 @@ "expo-image": "^2.0.0", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1" + "react-native-reanimated": "^3.16.7" } } diff --git a/suite-native/message-system/package.json b/suite-native/message-system/package.json index bef7af1a818..6c381a6ec1a 100644 --- a/suite-native/message-system/package.json +++ b/suite-native/message-system/package.json @@ -26,7 +26,7 @@ "@trezor/theme": "workspace:*", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/module-accounts-import/package.json b/suite-native/module-accounts-import/package.json index e78669a7e12..6fb9123358a 100644 --- a/suite-native/module-accounts-import/package.json +++ b/suite-native/module-accounts-import/package.json @@ -47,7 +47,7 @@ "react": "18.2.0", "react-hook-form": "^7.54.2", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/module-authorize-device/package.json b/suite-native/module-authorize-device/package.json index 7b5b86e700b..2cd4c5e64fd 100644 --- a/suite-native/module-authorize-device/package.json +++ b/suite-native/module-authorize-device/package.json @@ -34,7 +34,7 @@ "@trezor/styles": "workspace:*", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-svg": "^15.9.0", "react-redux": "8.0.7" } diff --git a/suite-native/module-send/package.json b/suite-native/module-send/package.json index e2a67c76311..1f2ea60f495 100644 --- a/suite-native/module-send/package.json +++ b/suite-native/module-send/package.json @@ -51,7 +51,7 @@ "react": "18.2.0", "react-hook-form": "^7.54.2", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-svg": "^15.9.0", "react-redux": "8.0.7", "web3-utils": "^4.3.1" diff --git a/suite-native/navigation/package.json b/suite-native/navigation/package.json index fffa9dd7356..0398e51190b 100644 --- a/suite-native/navigation/package.json +++ b/suite-native/navigation/package.json @@ -32,7 +32,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-keyboard-aware-scroll-view": "0.9.5", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "^4.14.0", "react-redux": "8.0.7" } diff --git a/suite-native/notifications/package.json b/suite-native/notifications/package.json index 4959de23bf5..2ff77232da8 100644 --- a/suite-native/notifications/package.json +++ b/suite-native/notifications/package.json @@ -26,7 +26,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-gesture-handler": "^2.21.0", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/react-native-graph/package.json b/suite-native/react-native-graph/package.json index 68995e7f41c..bd179cf3106 100644 --- a/suite-native/react-native-graph/package.json +++ b/suite-native/react-native-graph/package.json @@ -17,7 +17,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-gesture-handler": "^2.21.0", - "react-native-reanimated": "3.16.1" + "react-native-reanimated": "^3.16.7" }, "devDependencies": { "@trezor/eslint": "workspace:*" diff --git a/suite-native/receive/package.json b/suite-native/receive/package.json index 6f3e25f4453..097991cc1a9 100644 --- a/suite-native/receive/package.json +++ b/suite-native/receive/package.json @@ -38,7 +38,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-gesture-handler": "^2.21.0", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-redux": "8.0.7" } } diff --git a/suite-native/toasts/package.json b/suite-native/toasts/package.json index aa5df7e61e8..2021f264ba2 100644 --- a/suite-native/toasts/package.json +++ b/suite-native/toasts/package.json @@ -17,7 +17,7 @@ "@trezor/theme": "workspace:*", "jotai": "1.9.1", "react": "18.2.0", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-safe-area-context": "4.14.0" } } diff --git a/suite-native/transactions/package.json b/suite-native/transactions/package.json index 4d8a47f48a5..8146f5bbb91 100644 --- a/suite-native/transactions/package.json +++ b/suite-native/transactions/package.json @@ -41,7 +41,7 @@ "react": "18.2.0", "react-native": "0.76.1", "react-native-gesture-handler": "^2.21.0", - "react-native-reanimated": "3.16.1", + "react-native-reanimated": "^3.16.7", "react-native-svg": "15.9.0", "react-redux": "8.0.7" } diff --git a/suite-native/video-assets/package.json b/suite-native/video-assets/package.json index c432a91cc84..6863321d0be 100644 --- a/suite-native/video-assets/package.json +++ b/suite-native/video-assets/package.json @@ -18,6 +18,6 @@ "prettier": "^3.3.2", "react": "18.2.0", "react-native": "0.76.1", - "react-native-reanimated": "3.16.1" + "react-native-reanimated": "^3.16.7" } } diff --git a/yarn.lock b/yarn.lock index 7883a6f53ae..2e224cb91ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9891,7 +9891,7 @@ __metadata: react: "npm:18.2.0" react-hook-form: "npm:^7.54.2" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -9907,7 +9907,7 @@ __metadata: jotai: "npm:1.9.1" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" languageName: unknown linkType: soft @@ -10041,7 +10041,7 @@ __metadata: react-native-keyboard-aware-scroll-view: "npm:0.9.5" react-native-mmkv: "npm:2.12.2" react-native-quick-crypto: "npm:^0.7.6" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-restart: "npm:0.0.27" react-native-safe-area-context: "npm:^4.14.0" react-native-screens: "npm:^4.0.0" @@ -10077,7 +10077,7 @@ __metadata: "@suite-native/tokens": "workspace:*" react: "npm:^18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -10105,7 +10105,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-gesture-handler: "npm:^2.21.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-safe-area-context: "npm:^4.14.0" react-native-svg: "npm:15.9.0" languageName: unknown @@ -10166,7 +10166,7 @@ __metadata: expo-linear-gradient: "npm:^14.0.1" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-svg: "npm:^15.9.0" react-redux: "npm:8.0.7" languageName: unknown @@ -10242,7 +10242,7 @@ __metadata: jotai: "npm:1.9.1" react: "npm:^18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-safe-area-context: "npm:^4.14.0" react-redux: "npm:8.0.7" languageName: unknown @@ -10283,7 +10283,7 @@ __metadata: lottie-react-native: "npm:^7.1.0" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" semver: "npm:^7.6.3" languageName: unknown @@ -10343,7 +10343,7 @@ __metadata: "@trezor/styles": "workspace:*" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-safe-area-context: "npm:4.14.0" react-redux: "npm:8.0.7" languageName: unknown @@ -10421,7 +10421,7 @@ __metadata: jotai: "npm:1.9.1" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" redux-persist: "npm:6.0.0" languageName: unknown @@ -10453,7 +10453,7 @@ __metadata: expo-image: "npm:^2.0.0" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" languageName: unknown linkType: soft @@ -10501,7 +10501,7 @@ __metadata: "@trezor/theme": "workspace:*" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -10546,7 +10546,7 @@ __metadata: react: "npm:18.2.0" react-hook-form: "npm:^7.54.2" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -10646,7 +10646,7 @@ __metadata: "@trezor/styles": "workspace:*" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-svg: "npm:^15.9.0" react-redux: "npm:8.0.7" languageName: unknown @@ -10841,7 +10841,7 @@ __metadata: react: "npm:18.2.0" react-hook-form: "npm:^7.54.2" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-svg: "npm:^15.9.0" react-redux: "npm:8.0.7" web3-utils: "npm:^4.3.1" @@ -10937,7 +10937,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-keyboard-aware-scroll-view: "npm:0.9.5" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-safe-area-context: "npm:^4.14.0" react-redux: "npm:8.0.7" languageName: unknown @@ -10963,7 +10963,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-gesture-handler: "npm:^2.21.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -11000,7 +11000,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-gesture-handler: "npm:^2.21.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" languageName: unknown linkType: soft @@ -11036,7 +11036,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-gesture-handler: "npm:^2.21.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-redux: "npm:8.0.7" languageName: unknown linkType: soft @@ -11162,7 +11162,7 @@ __metadata: "@trezor/theme": "workspace:*" jotai: "npm:1.9.1" react: "npm:18.2.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-safe-area-context: "npm:4.14.0" languageName: unknown linkType: soft @@ -11217,7 +11217,7 @@ __metadata: react: "npm:18.2.0" react-native: "npm:0.76.1" react-native-gesture-handler: "npm:^2.21.0" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" react-native-svg: "npm:15.9.0" react-redux: "npm:8.0.7" languageName: unknown @@ -11233,7 +11233,7 @@ __metadata: prettier: "npm:^3.3.2" react: "npm:18.2.0" react-native: "npm:0.76.1" - react-native-reanimated: "npm:3.16.1" + react-native-reanimated: "npm:^3.16.7" languageName: unknown linkType: soft @@ -36076,9 +36076,9 @@ __metadata: languageName: node linkType: hard -"react-native-reanimated@npm:3.16.1": - version: 3.16.1 - resolution: "react-native-reanimated@npm:3.16.1" +"react-native-reanimated@npm:^3.16.7": + version: 3.16.7 + resolution: "react-native-reanimated@npm:3.16.7" dependencies: "@babel/plugin-transform-arrow-functions": "npm:^7.0.0-0" "@babel/plugin-transform-class-properties": "npm:^7.0.0-0" @@ -36095,7 +36095,7 @@ __metadata: "@babel/core": ^7.0.0-0 react: "*" react-native: "*" - checksum: 10/3e46c32655a5e3d89dd79606179ebd6da96cedf31f15c64a32d4cea2c35ec5724411099aeaa59e5f8220c93fc268ee1b391b3210e7e87e43544e279edd2a2ccc + checksum: 10/37099178efca335ea74bb0fc1b50ad898c2b24b1ed99e67bfb90e8898e1fadace2d2765a275d7d23b9c141d19fc673bb4b78dcb9f47d08921dd911c76b5040aa languageName: node linkType: hard