Skip to content

Commit

Permalink
fix: add avax-like apps to use eth app
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduma-ledger committed Nov 20, 2024
1 parent a6ac170 commit fa11bae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions libs/ledger-live-common/src/hw/actions/startExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fa11bae

Please sign in to comment.