Skip to content

Commit b67e6ba

Browse files
fix(proxy): unblock codecheck and trim proxy migration leftovers
Restore production logger verbosity wiring, apply ws-proxy client lint fixes, and remove now-unused CLI dependencies from the proxy migration to keep codecheck and dependency surface clean. Made-with: Cursor
1 parent b2e2f23 commit b67e6ba

File tree

6 files changed

+120
-121
lines changed

6 files changed

+120
-121
lines changed

apps/cli/package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@
7070
"rxjs": "catalog:",
7171
"usb": "*",
7272
"winston": "3.13.0",
73-
"ws": "catalog:",
7473
"@zondax/ledger-live-icp": "1.4.1"
7574
},
7675
"devDependencies": {
@@ -79,16 +78,12 @@
7978
"@pnpm/exportable-manifest": "1000.0.7",
8079
"@pnpm/read-project-manifest": "1000.0.6",
8180
"@types/asciichart": "1.5.8",
82-
"@types/body-parser": "1.19.5",
8381
"@types/command-line-args": "5.2.3",
84-
"@types/cors": "2.8.17",
85-
"@types/express": "4.17.21",
8682
"@types/invariant": "2.2.37",
8783
"@types/lodash": "4.17.7",
8884
"@types/node": "22.10.10",
8985
"@types/pako": "2.0.3",
9086
"@types/qrcode-terminal": "0.12.2",
91-
"@types/ws": "8.5.10",
9287
"ts-node": "10.9.2",
9388
"@rslib/core": "catalog:",
9489
"yaml": "2.8.1"

apps/ledger-live-mobile/src/logger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export class ConsoleLogger {
5050
* Refreshes the logger config from the `VERBOSE` env variable
5151
*/
5252
refreshSetup() {
53-
const logVerbose = ["true"]; // getEnv("VERBOSE");
53+
const logVerbose = getEnv("VERBOSE");
5454

5555
if (logVerbose) {
5656
this.everyLogs =

apps/ledger-live-mobile/src/transport/useProxyDiscovery.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ export const useProxyDiscovery = () => {
2525
);
2626

2727
return {
28-
effectiveProxyUrl,
2928
proxyDevices,
30-
proxyDiscoveryError: wsProxyState.error,
3129
};
3230
};

libs/live-dmk-mobile/src/hooks/useDeviceManagementKit.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const getDeviceManagementKit = (): DeviceManagementKit => {
2525
instance = new DeviceManagementKitBuilder()
2626
.addTransport(RNBleTransportFactory)
2727
.addTransport(RNHidTransportFactory)
28-
.addTransport(wsProxyTransportFactory)
28+
.addTransport(wsProxyTransportFactory) // NB: safe to add even in prod as it's a noop if the WS proxy URL is not set
2929
.addLogger(new LedgerLiveLogger(LogLevel.Debug))
3030
.addConfig({ firmwareDistributionSalt })
3131
.build();

libs/live-dmk-ws-proxy-client/src/transport/WsProxyLegacyTransportCompat.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,14 @@ const toErrorLogData = (error: unknown): Record<string, unknown> => {
2323
base.name = error.name;
2424
base.message = error.message;
2525
}
26-
if (
27-
error &&
28-
typeof error === "object" &&
29-
"_tag" in error &&
30-
typeof error._tag === "string"
31-
) {
26+
if (error && typeof error === "object" && "_tag" in error && typeof error._tag === "string") {
3227
base.tag = error._tag;
3328
}
3429
return base;
3530
};
3631

3732
const toHexPreview = (hex: string): string =>
38-
hex.length > APDU_LOG_PREVIEW_HEX_LENGTH
39-
? `${hex.slice(0, APDU_LOG_PREVIEW_HEX_LENGTH)}…`
40-
: hex;
33+
hex.length > APDU_LOG_PREVIEW_HEX_LENGTH ? `${hex.slice(0, APDU_LOG_PREVIEW_HEX_LENGTH)}…` : hex;
4134

4235
/**
4336
* Bridge transport that extends the legacy hw-transport Transport class

0 commit comments

Comments
 (0)