Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/rotten-brooms-drive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"ledger-live-desktop": minor
"live-mobile": minor
"@ledgerhq/live-common": minor
"@ledgerhq/live-cli": minor
---

chore: removed swap legacy
2 changes: 0 additions & 2 deletions apps/cli/src/commands-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ import portfolio from "./commands/live/portfolio";
import synchronousOnboarding from "./commands/live/synchronousOnboarding";
import user from "./commands/live/user";
import version from "./commands/live/version";
import swap from "./commands/ptx/swap";

export default {
bot,
Expand Down Expand Up @@ -119,5 +118,4 @@ export default {
synchronousOnboarding,
user,
version,
swap,
};
299 changes: 0 additions & 299 deletions apps/cli/src/commands/ptx/swap.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,7 @@ import {
DeviceInfo,
DeviceModelInfo,
} from "@ledgerhq/types-live";
import {
ExchangeRate,
ExchangeSwap,
InitSwapResult,
} from "@ledgerhq/live-common/exchange/swap/types";
import { ExchangeRate, ExchangeSwap } from "@ledgerhq/live-common/exchange/swap/types";
import { Transaction, TransactionStatus } from "@ledgerhq/live-common/generated/types";
import { AppAndVersion } from "@ledgerhq/live-common/hw/connectApp";
import { Device } from "@ledgerhq/types-devices";
Expand Down Expand Up @@ -137,9 +133,6 @@ type States = PartialNullable<{
deviceStreamingProgress: number;
displayUpgradeWarning: boolean;
passWarning: () => void;
initSwapRequested: boolean;
initSwapError: Error;
initSwapResult: InitSwapResult | null;
installingLanguage: boolean;
languageInstallationRequested: boolean;
signMessageRequested: AnyMessage;
Expand Down Expand Up @@ -250,9 +243,6 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({
transactionChecksOptIn,
displayUpgradeWarning,
passWarning,
initSwapRequested,
initSwapError,
initSwapResult,
completeExchangeStarted,
completeExchangeResult,
completeExchangeError,
Expand Down Expand Up @@ -512,27 +502,6 @@ export const DeviceActionDefaultRendering = <R, H extends States, P>({
}
}

if (initSwapRequested && !initSwapResult && !initSwapError) {
const { transaction, exchange, exchangeRate } = request as {
transaction: Transaction;
exchange: ExchangeSwap;
exchangeRate: ExchangeRate;
};
const { amountExpectedTo, estimatedFees } = hookState;
return renderSwapDeviceConfirmation({
modelId,
type,
transaction,
exchangeRate,
exchange,
amountExpectedTo: amountExpectedTo ?? undefined,
estimatedFees: estimatedFees ?? undefined,
swapDefaultTrack,
stateSettings,
walletState,
});
}

if (allowOpeningRequestedWording || requestOpenApp) {
// requestOpenApp for Nano S 1.3.1 (need to ask user to open the app.)
const wording = allowOpeningRequestedWording || requestOpenApp || "";
Expand Down
Loading
Loading