@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
10 lines (7 loc) • 358 B
text/typescript
import { ExchangeSell, ExchangeSellRaw } from "./platform/types";
import { ExchangeSwap, ExchangeSwapRaw } from "./swap/types";
export type Exchange = ExchangeSwap | ExchangeSell;
export function isExchangeSwap(exchange: Exchange): exchange is ExchangeSwap {
return "toAccount" in exchange;
}
export type ExchangeRaw = ExchangeSwapRaw | ExchangeSellRaw;