From 632e2c43e6c2655704d5862d887737b45332b12e Mon Sep 17 00:00:00 2001 From: Andrei Covaciu Date: Mon, 9 Dec 2024 12:58:22 +0200 Subject: [PATCH] fix: LNS Swap for SOL (#8640) --- .changeset/blue-rice-behave.md | 5 +++++ .../src/renderer/components/LiveAppDrawer.tsx | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 .changeset/blue-rice-behave.md diff --git a/.changeset/blue-rice-behave.md b/.changeset/blue-rice-behave.md new file mode 100644 index 000000000000..e5aae205f54e --- /dev/null +++ b/.changeset/blue-rice-behave.md @@ -0,0 +1,5 @@ +--- +"ledger-live-desktop": minor +--- + +Fix LNS Swap for SOL diff --git a/apps/ledger-live-desktop/src/renderer/components/LiveAppDrawer.tsx b/apps/ledger-live-desktop/src/renderer/components/LiveAppDrawer.tsx index ac7e7f3c78ef..75e393de4486 100644 --- a/apps/ledger-live-desktop/src/renderer/components/LiveAppDrawer.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/LiveAppDrawer.tsx @@ -85,8 +85,11 @@ const INCOMPATIBLE_NANO_S_CURRENCY_KEYS: Keys = { }, }; const getIncompatibleCurrencyKeys = (exchange: ExchangeSwap) => { - const parentFrom = exchange?.fromParentAccount?.currency?.id || ""; - const parentTo = exchange?.toParentAccount?.currency?.id || ""; + const parentFrom = + (exchange?.fromAccount?.type === "TokenAccount" && exchange?.fromParentAccount?.currency?.id) || + ""; + const parentTo = + (exchange?.toAccount?.type === "TokenAccount" && exchange?.toParentAccount?.currency?.id) || ""; const from = (exchange?.fromAccount.type === "Account" && exchange?.fromAccount?.currency?.id) || ""; const to = (exchange?.toAccount.type === "Account" && exchange?.toAccount?.currency?.id) || "";