@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
35 lines • 1.57 kB
TypeScript
import { BigNumber } from "bignumber.js";
import { getAccountCurrency } from "@ledgerhq/ledger-wallet-framework/account/helpers";
import type { SendFlowTransactionActions } from "../types";
import type { Transaction, TransactionStatus } from "../../../generated/types";
import type { Account, AccountLike } from "@ledgerhq/types-live";
export type UseSendFlowAmountReviewCoreLabels = Readonly<{
getCtaLabel: (currency: string) => string;
reviewCta: string;
}>;
export type UseSendFlowAmountReviewCoreParams = Readonly<{
account: AccountLike;
parentAccount: Account | null;
transaction: Transaction;
status: TransactionStatus;
bridgePending: boolean;
transactionActions: SendFlowTransactionActions;
labels: UseSendFlowAmountReviewCoreLabels;
}>;
export type UseSendFlowAmountReviewCoreResult = Readonly<{
mainAccount: Account;
accountCurrency: ReturnType<typeof getAccountCurrency>;
updateTransactionWithPatch: (patch: Partial<Transaction>) => void;
hasRawAmount: boolean;
shouldPrepare: boolean;
amountComputationPending: boolean;
maxAvailable: BigNumber;
hasInsufficientFundsError: boolean;
hasErrors: boolean;
hasAmount: boolean;
reviewLabel: string;
reviewShowIcon: boolean;
reviewDisabled: boolean;
}>;
export declare function useSendFlowAmountReviewCore({ account, parentAccount, transaction, status, bridgePending, transactionActions, labels, }: UseSendFlowAmountReviewCoreParams): UseSendFlowAmountReviewCoreResult;
//# sourceMappingURL=useSendFlowAmountReviewCore.d.ts.map