Skip to content

Commit

Permalink
feat: backwards compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduma-ledger committed Sep 2, 2024
1 parent d62cf06 commit 232df5e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/ledger-live-common/src/wallet-api/Exchange/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
ExchangeType,
ExchangeStartSellParams,
SwapLiveError,
ExchangeCompleteSwapParams,
} from "@ledgerhq/wallet-api-exchange-module";
import { decodePayloadProtobuf } from "@ledgerhq/hw-app-exchange";
import { TrackingAPI } from "./tracking";
Expand Down Expand Up @@ -290,6 +291,11 @@ export const handlers = ({
binaryPayload: params.hexBinaryPayload,
exchange,
feesStrategy: params.feeStrategy,
// swapId still here for backwards compatibility, we are planning to rename this field to quoteId to align with sell and card
swapId:
params.exchangeType === "SWAP"
? (params as ExchangeCompleteSwapParams).swapId
: undefined,
quoteId: quoteOrSwapId,
amountExpectedTo,
magnitudeAwareRate,
Expand Down

0 comments on commit 232df5e

Please sign in to comment.