@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
28 lines • 1.47 kB
TypeScript
import { Account } from "@ledgerhq/types-live";
import { Result } from "../../../bridge/useBridgeTransaction";
import { Transaction } from "../../../generated/types";
import { ExchangeRate, OnNoRatesCallback, SwapSelectorStateType, SwapTransactionType } from "../types";
export declare const selectorStateDefaultValues: {
currency: undefined;
account: undefined;
parentAccount: undefined;
amount: undefined;
};
export type SetExchangeRateCallback = (exchangeRate?: ExchangeRate) => void;
export declare const useFromAmountStatusMessage: ({ account, parentAccount, status, transaction }: Result<Transaction>, statusTypeToInclude: string[], sponsored?: boolean) => Error | undefined;
type UseSwapTransactionProps = {
accounts?: Account[];
setExchangeRate?: SetExchangeRateCallback;
defaultCurrency?: SwapSelectorStateType["currency"];
defaultAccount?: SwapSelectorStateType["account"];
defaultParentAccount?: SwapSelectorStateType["parentAccount"];
onNoRates?: OnNoRatesCallback;
excludeFixedRates?: boolean;
refreshRate?: number;
allowRefresh?: boolean;
isEnabled?: boolean;
sponsored?: boolean;
};
export declare const useSwapTransaction: ({ accounts, setExchangeRate, defaultCurrency, defaultAccount, defaultParentAccount, onNoRates, excludeFixedRates, refreshRate, allowRefresh, isEnabled, sponsored, }: UseSwapTransactionProps) => SwapTransactionType;
export {};
//# sourceMappingURL=useSwapTransaction.d.ts.map