Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix πŸ›(chore) build #8968

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ function readPackage(pkg, context) {
};
}

if (!!pkg.devDependencies["metro"] && pkg.name.startsWith("@sentry/react-native")) {
pkg.dependencies["metro"] = pkg.devDependencies["metro"];
pkg.dependencies["metro"] = "*";
delete pkg.devDependencies["metro"];
}

process(
[
/*
Expand Down Expand Up @@ -64,7 +70,7 @@ function readPackage(pkg, context) {
}),
/* @celo/* packages */
addDependencies("@celo/connect", {
"web3": pkg.peerDependencies?.web3 ?? "1.10",
web3: pkg.peerDependencies?.web3 ?? "1.10",
}),
/* @cosmjs/* packages */
addDependencies("@cosmjs/proto-signing", {
Expand Down
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.android.nightly
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
APP_NAME="LL [STAGING]"
ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
SENTRY_DSN=https://e16494560bce41b1a27e60095f0cd7e0@o118392.ingest.sentry.io/6549924
SENTRY_DISABLE_AUTO_UPLOAD=false
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.android.prerelease
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
APP_NAME="Ledger Live"
SENTRY_DSN=https://ea730d6c531f40679e7306c888f7fbc5@o118392.ingest.sentry.io/6723478
SENTRY_DISABLE_AUTO_UPLOAD=false
ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3
BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17"
BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.android.release
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
APP_NAME="Ledger Live"
SENTRY_DSN=https://bfd61f321b4144ffbce693aa6c6be9d0@o118392.ingest.sentry.io/6505213
SENTRY_DISABLE_AUTO_UPLOAD=false
ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3
BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17"
BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
4 changes: 3 additions & 1 deletion apps/ledger-live-mobile/.env.android.staging
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
APP_NAME="LL [STAGING]"
SENTRY_DSN=https://0109819a39084e718120d031def0db38@o118392.ingest.sentry.io/6619343
SENTRY_DISABLE_AUTO_UPLOAD=false

ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.ios.nightly
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
APP_NAME="LL [STAGING]"
ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production"
SENTRY_DISABLE_AUTO_UPLOAD=false
SENTRY_DSN=https://3b35bb6adb6541db95d13e56dec0a0f9@o118392.ingest.sentry.io/6549925
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.ios.prerelease
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
APP_NAME="Ledger Live"
SENTRY_DSN=https://52a4181714f74dffa9cdf48224dba505@o118392.ingest.sentry.io/6723477
ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3
SENTRY_DISABLE_AUTO_UPLOAD=false
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production"
BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17"
BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.ios.release
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
APP_NAME="Ledger Live"
SENTRY_DSN=https://b4ac5f291b7a48529fc7ec1f34cf57ed@o118392.ingest.sentry.io/6505205
ANALYTICS_TOKEN=jfUZbw28ig8JpEi9DZpTUc21dKUKu1e3
SENTRY_DISABLE_AUTO_UPLOAD=false
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Production"
BRAZE_ANDROID_API_KEY="b34d1245-04d6-4209-9580-eed4ec82cf17"
BRAZE_IOS_API_KEY="93d6248d-f2e9-4255-84bc-6b551b7afcd2"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/.env.ios.staging
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
APP_NAME="LL [STAGING]"
SENTRY_DSN=https://bd8b742115104e82b9ad3686fd9fd9f2@o118392.ingest.sentry.io/6619346
SENTRY_DISABLE_AUTO_UPLOAD=false
ANALYTICS_TOKEN=Yc026bN2XbyBhTCPDFY0VibJugAKnjmh
GOOGLE_SERVICE_INFO_NAME="GoogleService-Info-Staging"
BRAZE_ANDROID_API_KEY="4ef07be0-a4ea-4f73-81a9-760e473959f3"
BRAZE_IOS_API_KEY="4d6c9f5b-823e-4ea0-8158-5359bdf89618"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
BRAZE_CUSTOM_ENDPOINT="sdk.fra-02.braze.eu"
20 changes: 13 additions & 7 deletions apps/ledger-live-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: "io.sentry.android.gradle"

apply plugin: 'com.google.gms.google-services'

Expand Down Expand Up @@ -63,6 +64,7 @@ react {
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
/* Autolinking */

autolinkLibrariesWithApp()
}

Expand All @@ -73,13 +75,6 @@ project.ext.react = [
enableHermes: true,
bundleInDebug: System.getenv("ANDROID_BUNDLE_IN_DEBUG") != null, // Generates JS bundle and sourcemap at build time
]
project.ext.sentryCli = [
logLevel: "debug"
]

if (System.getenv("SENTRY_AUTH_TOKEN") != null) {
apply from: "../../node_modules/@sentry/react-native/sentry.gradle"
}

/**
* Set this to true to create four separate APKs instead of one,
Expand Down Expand Up @@ -199,6 +194,17 @@ android {
}
}


apply from: "../../node_modules/@sentry/react-native/sentry.gradle"


sentry {
autoUploadProguardMapping = shouldSentryAutoUpload()
uploadNativeSymbols = shouldSentryAutoUpload()
}



dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
Expand Down
3 changes: 2 additions & 1 deletion apps/ledger-live-mobile/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath("io.sentry:sentry-android-gradle-plugin:4.14.1")
classpath("com.android.tools.build:gradle:7.4.1")
classpath("com.facebook.react:react-native-gradle-plugin")
// NOTE: Do not place your application dependencies here; they belong
Expand Down Expand Up @@ -70,4 +71,4 @@ allprojects {
force "androidx.core:core-ktx:$rootProject.ext.androidXCore"
}
}
}
}
2 changes: 2 additions & 0 deletions apps/ledger-live-mobile/android/sentry.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
defaults.url=https://sentry.io/
defaults.org=ledger


28 changes: 23 additions & 5 deletions apps/ledger-live-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1983,11 +1983,29 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- RNSentry (5.24.3):
- RNSentry (6.5.0):
- DoubleConversion
- glog
- hermes-engine
- RCT-Folly (= 2024.01.01.00)
- RCTRequired
- RCTTypeSafety
- React-Core
- React-debug
- React-Fabric
- React-featureflags
- React-graphics
- React-hermes
- Sentry/HybridSDK (= 8.36.0)
- React-ImageManager
- React-NativeModulesApple
- React-RCTFabric
- React-rendererdebug
- React-utils
- ReactCodegen
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Sentry/HybridSDK (= 8.43.0)
- Yoga
- RNShare (10.1.0):
- React-Core
- RNSVG (13.14.0):
Expand Down Expand Up @@ -2022,7 +2040,7 @@ PODS:
- segment-analytics-react-native (2.19.1):
- React-Core
- sovran-react-native
- Sentry/HybridSDK (8.36.0)
- Sentry/HybridSDK (8.43.0)
- SocketRocket (0.7.0)
- sovran-react-native (0.4.5):
- React-Core
Expand Down Expand Up @@ -2576,14 +2594,14 @@ SPEC CHECKSUMS:
RNReactNativeHapticFeedback: ec56a5f81c3941206fd85625fa669ffc7b4545f9
RNReanimated: 82b558efb00a30a3b8ea1a3ca8975125e9400313
RNScreens: 63500b789c1b5286972a55d4a7d73fc1123f51e4
RNSentry: e7e5d059d62d6c447d83e14800edc1812a594a5d
RNSentry: e1a16a23ada7d12686dff2f1eeaf55a08738585c
RNShare: b674d9f1cb0dc11116983bebd8712908a226a3ee
RNSVG: d00c8f91c3cbf6d476451313a18f04d220d4f396
RNVectorIcons: 6382277afab3c54658e9d555ee0faa7a37827136
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d
segment-analytics-react-native: 1c36d83c0a735795e304178241331e7701dc5d2a
Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57
Sentry: 532b281a53b1b45a523fd592f608956fb36e577c
SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d
sovran-react-native: fd3dc8f1a4b14acdc4ad25fc6b4ac4f52a2a2a15
Storyly: 310297bcf4493d3d5b41e71834fba49502c8067a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
3407D5D8215D2AB800C9D40B /* NeededForBLE.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NeededForBLE.swift; sourceTree = "<group>"; };
3B6982A2E67F482A8069215B /* Inter-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Medium.otf"; path = "../node_modules/@ledgerhq/native-ui/lib/assets/fonts/inter/Inter-Medium.otf"; sourceTree = "<group>"; };
3E71666B2C4291351C2BA23C /* Pods-ledgerlivemobileTests.staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ledgerlivemobileTests.staging.xcconfig"; path = "Target Support Files/Pods-ledgerlivemobileTests/Pods-ledgerlivemobileTests.staging.xcconfig"; sourceTree = "<group>"; };
3FF1B576B23156C611F7B818 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = ledgerlivemobile/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
3FF1B576B23156C611F7B818 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = ledgerlivemobile/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
44387CB2EE84464C83A75FD7 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "OpenSans-Regular.ttf"; path = "../assets/fonts/OpenSans-Regular.ttf"; sourceTree = "<group>"; };
4BD106EA37CA467F9525D699 /* FontAwesome5_Pro_Brands.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Pro_Brands.ttf; path = ../assets/fonts/FontAwesome5_Pro_Brands.ttf; sourceTree = "<group>"; };
4C2397DC873B4F8E91B750A8 /* Inter-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Regular.otf"; path = "../assets/fonts/Inter-Regular.otf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -831,14 +831,8 @@
);
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
" ",
);
OTHER_CFLAGS = "$(inherited) ";
OTHER_CPLUSPLUSFLAGS = "$(inherited) ";
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -963,14 +957,8 @@
);
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
" ",
);
OTHER_CFLAGS = "$(inherited) ";
OTHER_CPLUSPLUSFLAGS = "$(inherited) ";
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1040,14 +1028,8 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
" ",
);
OTHER_CFLAGS = "$(inherited) ";
OTHER_CPLUSPLUSFLAGS = "$(inherited) ";
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1118,14 +1100,8 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
" ",
);
OTHER_CFLAGS = "$(inherited) ";
OTHER_CPLUSPLUSFLAGS = "$(inherited) ";
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1245,14 +1221,8 @@
"\"$(inherited)\"",
);
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = (
"$(inherited)",
" ",
);
OTHER_CPLUSPLUSFLAGS = (
"$(inherited)",
" ",
);
OTHER_CFLAGS = "$(inherited) ";
OTHER_CPLUSPLUSFLAGS = "$(inherited) ";
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
Expand Down
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const forcedDependencies = [
];

const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");

const { withSentryConfig } = require("@sentry/react-native/metro");
const removeStarPath = moduleName => moduleName.replace("/*", "");

const buildTsAlias = (conf = {}) =>
Expand Down Expand Up @@ -98,4 +98,4 @@ const metroConfig = {
},
};

module.exports = mergeConfig(getDefaultConfig(__dirname), metroConfig);
module.exports = withSentryConfig(mergeConfig(getDefaultConfig(__dirname), metroConfig));
4 changes: 2 additions & 2 deletions apps/ledger-live-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"@reduxjs/toolkit": "2.0.1",
"@segment/analytics-react-native": "2.19.1",
"@segment/sovran-react-native": "0.4.5",
"@sentry/react-native": "5.24.3",
"@sentry/react-native": "6.5.0",
"@shopify/flash-list": "1.6.4",
"@shopify/react-native-performance": "4.1.2",
"@shopify/react-native-performance-navigation": "3.0.0",
Expand Down Expand Up @@ -245,7 +245,7 @@
"@react-native-community/cli-platform-ios": "14.1.0",
"@react-native/babel-preset": "0.75.4",
"@react-native/dev-middleware": "0.75.4",
"@sentry/cli": "2.34.1",
"@sentry/cli": "2.41.1",
"@swc/core": "1.4.11",
"@swc/jest": "0.2.36",
"@testing-library/jest-native": "5.4.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { useFeature } from "@ledgerhq/live-common/featureFlags/index";
import { BUY_SELL_UI_APP_ID } from "@ledgerhq/live-common/wallet-api/constants";
import Braze from "@braze/react-native-sdk";
import { LiveAppManifest } from "@ledgerhq/live-common/platform/types";
import * as Sentry from "@sentry/react-native";
import { hasCompletedOnboardingSelector } from "~/reducers/settings";
import { navigationRef, isReadyRef } from "../rootnavigation";
import { ScreenName, NavigatorName } from "~/const";
Expand All @@ -27,7 +26,7 @@ import { track } from "~/analytics";
import { setEarnInfoModal } from "~/actions/earn";
import { blockPasswordLock } from "../actions/appstate";
import { useStorylyContext } from "~/components/StorylyStories/StorylyProvider";
const routingInstrumentation = new Sentry.ReactNavigationInstrumentation();
import { navigationIntegration } from "../sentry";
const TRACKING_EVENT = "deeplink_clicked";

const themes: {
Expand Down Expand Up @@ -674,7 +673,7 @@ export const DeeplinksProvider = ({
onReady={() => {
(isReadyRef as Writeable<typeof isReadyRef>).current = true;
setTimeout(() => SplashScreen.hide(), 300);
routingInstrumentation.registerNavigationContainer(navigationRef);
navigationIntegration.registerNavigationContainer(navigationRef);
}}
>
{children}
Expand Down
Loading
Loading