From fa11bae135cbe8b8b8ab70f5cf292715f1ffb527 Mon Sep 17 00:00:00 2001 From: chrisduma-ledger Date: Wed, 20 Nov 2024 13:20:00 +0200 Subject: [PATCH] fix: add avax-like apps to use eth app --- .../src/hw/actions/startExchange.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/libs/ledger-live-common/src/hw/actions/startExchange.ts b/libs/ledger-live-common/src/hw/actions/startExchange.ts index 513820da13a8..e329aed21b35 100644 --- a/libs/ledger-live-common/src/hw/actions/startExchange.ts +++ b/libs/ledger-live-common/src/hw/actions/startExchange.ts @@ -137,6 +137,20 @@ export const createAction = ( if (mainToAccount) { dependencies.push({ appName: mainToAccount?.currency?.managerAppName }); } + + const shouldAddEthApp = + (mainFromAccount?.currency?.family === "evm" || + mainToAccount?.currency?.family === "evm") && + mainFromAccount?.currency?.managerAppName !== "Ethereum" && + mainToAccount?.currency?.managerAppName !== "Ethereum"; + + // Check if we should add ETH app, for cases like when we want AVAX to use the ETH app. + if (shouldAddEthApp) { + dependencies.push({ + appName: "Ethereum", + }); + } + return { appName: "Exchange", dependencies,