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) || "";