UNPKG

@funkit/connect

Version:

Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.

21 lines (20 loc) 1.06 kB
import { PaymentMethod } from '~/domains/paymentMethods'; import type { ErrorNotification } from '~/components/FunNotification/FunNotification'; import type { AmountInputError } from './state'; export declare const ASSET_DECIMALS = 5; export declare const USD_DECIMALS = 2; export declare const USD_INITIAL_AMOUNT = 100; export declare function getDefaultAmountFromQuickOptions(quickOptions: number[] | undefined): number | undefined; export declare function getUsdMaxAmount(maxUsd: number): number | null; export declare function getUsdMinAmount(paymentMethod: PaymentMethod, defaultMin?: number): number; export interface InputAmountSuggestion { autoConfirm: boolean; buttonLabel: string; usdAmount: number; } /** * Get suggested amount from error * Allow recovery actions to user in the CTA Continue button */ export declare const getInputAmountSuggestion: (error: AmountInputError | null) => InputAmountSuggestion | undefined; export declare const getInputErrorNotification: (error: AmountInputError | null) => ErrorNotification | undefined;