Skip to content
Closed
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
36 changes: 18 additions & 18 deletions apps/ledger-live-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2441,15 +2441,15 @@ DEPENDENCIES:
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
- "DatadogSDKReactNative (from `../node_modules/@datadog/mobile-react-native`)"
- "DoubleConversion (from `../../../node_modules/.pnpm/[email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709b837442527d3897d1f563069_e5c117d3d754a7a98c260b18dfeac954/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)"
- "EXConstants (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1_68060181c6b197337d741123db6109b9/node_modules/expo-constants/ios`)"
- "EXImageLoader (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5_19a127edfcaf4cc45e7d65d3e0455c71/node_modules/expo-image-loader/ios`)"
- "Expo (from `../../../node_modules/.pnpm/[email protected].46_da95d96e6b14ca1108c91786bbc295f9/node_modules/expo`)"
- "ExpoAsset (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1809d_e12fbd8a50e595a6319b3e3621412cf0/node_modules/expo-asset/ios`)"
- "ExpoCrypto (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1809_139024f99efa72035b7aa8ca5faa66eb/node_modules/expo-crypto/ios`)"
- "ExpoFileSystem (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5_979371e6af3ae34c571344f67c59cd82/node_modules/expo-file-system/ios`)"
- "ExpoFont (from `../../../node_modules/.pnpm/[email protected].4_bddcfc85fa3d0a2d2bad040fdb52828d/node_modules/expo-font/ios`)"
- "ExpoImageManipulator (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b_47d96825de85513335ff56dea290b06d/node_modules/expo-image-manipulator/ios`)"
- "ExpoKeepAwake (from `../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f_3650db67bc18acb2144583548348205c/node_modules/expo-keep-awake/ios`)"
- "EXConstants (from `../../../node_modules/.pnpm/[email protected].8_176ddfde7199fc8230440531d34b5a22/node_modules/expo-constants/ios`)"
- "EXImageLoader (from `../../../node_modules/.pnpm/[email protected].0_176ddfde7199fc8230440531d34b5a22/node_modules/expo-image-loader/ios`)"
- "Expo (from `../../../node_modules/.pnpm/[email protected].46_@[email protected]_@[email protected]_@[email protected]__expo-modul_53140f7fb2100cd288f142e41dfd26ed/node_modules/expo`)"
- "ExpoAsset (from `../../../node_modules/.pnpm/[email protected].5_fe27d0449b241e4d57297a8cc76e548f/node_modules/expo-asset/ios`)"
- "ExpoCrypto (from `../../../node_modules/.pnpm/[email protected].2_176ddfde7199fc8230440531d34b5a22/node_modules/expo-crypto/ios`)"
- "ExpoFileSystem (from `../../../node_modules/.pnpm/[email protected].1_176ddfde7199fc8230440531d34b5a22/node_modules/expo-file-system/ios`)"
- "ExpoFont (from `../../../node_modules/.pnpm/[email protected].4_fe27d0449b241e4d57297a8cc76e548f/node_modules/expo-font/ios`)"
- "ExpoImageManipulator (from `../../../node_modules/.pnpm/[email protected].6_176ddfde7199fc8230440531d34b5a22/node_modules/expo-image-manipulator/ios`)"
- "ExpoKeepAwake (from `../../../node_modules/.pnpm/[email protected].3_176ddfde7199fc8230440531d34b5a22/node_modules/expo-keep-awake/ios`)"
- "ExpoModulesCore (from `../../../node_modules/.pnpm/[email protected][email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709_66be2728568375034107a6ab68203d84/node_modules/expo-modules-core`)"
- "fast_float (from `../../../node_modules/.pnpm/[email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709b837442527d3897d1f563069_e5c117d3d754a7a98c260b18dfeac954/node_modules/react-native/third-party-podspecs/fast_float.podspec`)"
- "FBLazyVector (from `../../../node_modules/.pnpm/[email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709b837442527d3897d1f563069_e5c117d3d754a7a98c260b18dfeac954/node_modules/react-native/Libraries/FBLazyVector`)"
Expand Down Expand Up @@ -2613,23 +2613,23 @@ EXTERNAL SOURCES:
DoubleConversion:
:podspec: "../../../node_modules/.pnpm/[email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709b837442527d3897d1f563069_e5c117d3d754a7a98c260b18dfeac954/node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
EXConstants:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1_68060181c6b197337d741123db6109b9/node_modules/expo-constants/ios"
:path: "../../../node_modules/.pnpm/[email protected].8_176ddfde7199fc8230440531d34b5a22/node_modules/expo-constants/ios"
EXImageLoader:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5_19a127edfcaf4cc45e7d65d3e0455c71/node_modules/expo-image-loader/ios"
:path: "../../../node_modules/.pnpm/[email protected].0_176ddfde7199fc8230440531d34b5a22/node_modules/expo-image-loader/ios"
Expo:
:path: "../../../node_modules/.pnpm/[email protected].46_da95d96e6b14ca1108c91786bbc295f9/node_modules/expo"
:path: "../../../node_modules/.pnpm/[email protected].46_@[email protected]_@[email protected]_@[email protected]__expo-modul_53140f7fb2100cd288f142e41dfd26ed/node_modules/expo"
ExpoAsset:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1809d_e12fbd8a50e595a6319b3e3621412cf0/node_modules/expo-asset/ios"
:path: "../../../node_modules/.pnpm/[email protected].5_fe27d0449b241e4d57297a8cc76e548f/node_modules/expo-asset/ios"
ExpoCrypto:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f1809_139024f99efa72035b7aa8ca5faa66eb/node_modules/expo-crypto/ios"
:path: "../../../node_modules/.pnpm/[email protected].2_176ddfde7199fc8230440531d34b5a22/node_modules/expo-crypto/ios"
ExpoFileSystem:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5_979371e6af3ae34c571344f67c59cd82/node_modules/expo-file-system/ios"
:path: "../../../node_modules/.pnpm/[email protected].1_176ddfde7199fc8230440531d34b5a22/node_modules/expo-file-system/ios"
ExpoFont:
:path: "../../../node_modules/.pnpm/[email protected].4_bddcfc85fa3d0a2d2bad040fdb52828d/node_modules/expo-font/ios"
:path: "../../../node_modules/.pnpm/[email protected].4_fe27d0449b241e4d57297a8cc76e548f/node_modules/expo-font/ios"
ExpoImageManipulator:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b_47d96825de85513335ff56dea290b06d/node_modules/expo-image-manipulator/ios"
:path: "../../../node_modules/.pnpm/[email protected].6_176ddfde7199fc8230440531d34b5a22/node_modules/expo-image-manipulator/ios"
ExpoKeepAwake:
:path: "../../../node_modules/.pnpm/[email protected].[email protected][email protected]_patch_hash=2b53c1e5f_3650db67bc18acb2144583548348205c/node_modules/expo-keep-awake/ios"
:path: "../../../node_modules/.pnpm/[email protected].3_176ddfde7199fc8230440531d34b5a22/node_modules/expo-keep-awake/ios"
ExpoModulesCore:
:path: "../../../node_modules/.pnpm/[email protected][email protected]_patch_hash=2b53c1e5f1809d0b579eb158f0090709_66be2728568375034107a6ab68203d84/node_modules/expo-modules-core"
fast_float:
Expand Down
6 changes: 6 additions & 0 deletions e2e/mobile/.husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0)
}
const husky = (await import('husky')).default
console.log(husky())
8 changes: 8 additions & 0 deletions e2e/mobile/.husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# .husky/pre-push

if git diff --name-only origin/main...HEAD | grep -q "^e2e/mobile"; then
echo "Running Husky pre-push for e2e mobile"
echo "You can skip this by setting HUSKY=0 env var or adding -n/--no-verify on git command"

pnpm e2e:mobile typecheck
fi
4 changes: 2 additions & 2 deletions e2e/mobile/bridge/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Server } from "ws";
import WebSocket from "ws";
import path from "path";
import fs from "fs";
import net from "net";
Expand Down Expand Up @@ -55,7 +55,7 @@ function isFeatureId(
}

export function init(port = 8099, onConnection?: () => void) {
webSocket.wss = new Server({ port });
webSocket.wss = new WebSocket.Server({ port });
webSocket.messages = {};
log(`Start listening on localhost:${port}`);

Expand Down
8 changes: 6 additions & 2 deletions e2e/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"scripts": {
"lint": "eslint . --ext .ts,.tsx --cache",
"lint:fix": "pnpm lint --fix",
"typecheck": "tsc --noEmit --project ./tsconfig.json",
"test:detox": "pnpm detox test",
"test:ios": "pnpm test:detox --configuration ios.sim.release",
"test:android": "pnpm test:detox --configuration android.emu.release",
Expand All @@ -14,8 +15,10 @@
"test:android:debug": "pnpm test:detox --configuration android.emu.debug",
"build:ios:debug": "pnpm --filter live-mobile run e2e:build --configuration ios.sim.debug",
"build:android:debug": "pnpm --filter live-mobile run e2e:build --configuration android.emu.debug",
"clean:detox": "pnpm detox clean-framework-cache && pnpm detox clean",
"allure:generate": "allure generate ./artifacts --clean -o ./artifacts/allure-report",
"allure:open": "allure open ./artifacts/allure-report"
"allure:open": "allure open ./artifacts/allure-report",
"prepare": "cd ../.. && husky e2e/mobile/.husky"
},
"dependencies": {
"@ledgerhq/logs": "workspace:^",
Expand Down Expand Up @@ -60,12 +63,13 @@
"expect": "27.5.1",
"express": "4.22.0",
"glob": "^11.0.1",
"husky": "9.1.7",
"jest": "30.2.0",
"jest-allure2-reporter": "2.2.8",
"jest-docblock": "30.2.0",
"jest-environment-node": "30.2.0",
"jest-util": "30.2.0",
"jest-metadata": "1.6.0",
"jest-util": "30.2.0",
"lodash": "4.17.21",
"ts-jest": "29.4.5",
"ts-node": "10.9.2",
Expand Down
4 changes: 2 additions & 2 deletions e2e/mobile/specs/ledgerSync/ledgerSync.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function initializeLedgerKeyRingProtocol() {
return CLI.ledgerKeyRingProtocol({
initMemberCredentials: true,
apiBaseUrl: ledgerKeyRingProtocolArgs.apiBaseUrl,
}).then((output: { pubkey: string; privatekey: string }) => {
}).then(output => {
if (output && "pubkey" in output) {
ledgerKeyRingProtocolArgs.pubKey = output.pubkey;
ledgerKeyRingProtocolArgs.privateKey = output.privatekey;
Expand Down Expand Up @@ -65,7 +65,7 @@ async function initializeLedgerSync() {
const output = CLI.ledgerKeyRingProtocol({
getKeyRingTree: true,
...ledgerKeyRingProtocolArgs,
}).then((out: { rootId: string; walletSyncEncryptionKey: string; applicationPath: string }) => {
}).then(out => {
if (out && "rootId" in out) {
ledgerSyncPushDataArgs.rootId = out.rootId;
ledgerSyncPushDataArgs.walletSyncEncryptionKey = out.walletSyncEncryptionKey;
Expand Down
42 changes: 13 additions & 29 deletions e2e/mobile/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,27 @@
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"experimentalDecorators": true,
"moduleResolution": "bundler",
"moduleDetection": "force",
"module": "preserve",
Comment on lines +5 to +7
Copy link

Copilot AI Jan 5, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The combination of "moduleResolution": "bundler" with "module": "preserve" may not be optimal for a Node.js testing environment. The "bundler" module resolution is designed for bundlers like Webpack or Vite, not for Node.js. For a Node.js environment with modern TypeScript, consider using "moduleResolution": "node" or "nodenext" instead, along with an appropriate "module" setting like "commonjs" or "esnext".

Suggested change
"moduleResolution": "bundler",
"moduleDetection": "force",
"module": "preserve",
"moduleResolution": "nodenext",
"moduleDetection": "force",
"module": "esnext",

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to set it as bundler and preserve, because we are importing modules from apps/ledger-live-mobile, typecheck would fail otherwise. Any other suggestion?

"isolatedModules": true,
"allowJs": false,
"checkJs": false,
"jsx": "react-native",
"lib": [
"es2017",
"DOM"
],
"lib": ["es2017", "DOM"],
"skipLibCheck": true,
"noEmit": true,
"baseUrl": ".",
"typeRoots": [
"./types",
"./node_modules/@types"
],
"typeRoots": ["./types", "./node_modules/@types"],
"paths": {
"LLM/*": [
"../../apps/ledger-live-mobile/src/newArch/*"
],
"~/*": [
"../../apps/ledger-live-mobile/src/*"
],
"@ledgerhq/live-common/hw/index": [
"../../libs/ledger-live-common/src/hw/index"
],
"@ledgerhq/live-common/hw/deviceAccess": [
"../../libs/ledger-live-common/src/hw/deviceAccess"
]
"LLM/*": ["../../apps/ledger-live-mobile/src/newArch/*"],
"~/*": ["../../apps/ledger-live-mobile/src/*"]
}
},
"include": [
"types",
"**/*.ts",
"**/*.tsx"
"./**/*.ts",
"../../apps/ledger-live-mobile/**/*.d.ts",
"../../apps/ledger-live-mobile/src/**/*.{ts,tsx}"
],
"exclude": [
"node_modules",
"babel.config.js",
"jest.config.js",
"**/*.js"
]
"exclude": ["node_modules", "babel.config.js", "jest.config.js"]
}
2 changes: 1 addition & 1 deletion e2e/mobile/utils/initUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
removeSpeculosAndDeregisterKnownSpeculos,
} from "./speculosUtils";
import { waitForSpeculosReady } from "@ledgerhq/live-common/e2e/speculosCI";
import { SettingsSetOverriddenFeatureFlagsPlayload } from "~/actions/types";
import { SettingsSetOverriddenFeatureFlagsPlayload } from "../../../apps/ledger-live-mobile/src/actions/types";

type CliCommand = (
userdataPath?: string,
Expand Down
Loading
Loading