UNPKG

@funkit/connect

Version:

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

26 lines (25 loc) 1.01 kB
/** * Retrieves the maximum checkout amount in USD and formats the limit text. * * @description * This hook uses a feature flag to determine the maximum checkout amount. * If the amount is Number.MAX_VALUE, it returns 'no' as the limit text. * Otherwise, it formats the amount as a currency string with specific formatting options. * * @returns {Object} An object containing: * - `value`: The maximum checkout amount in USD (number). Defaults to Number.MAX_VALUE. * - `limitLabel`: A formatted string representing the checkout limit * - Returns 'no' if the limit is Number.MAX_VALUE (default) * - Otherwise, returns a formatted currency string (e.g., '$1k') * * @example * // Example usage in a component * const { value, limitLabel } = useFunkitMaxCheckoutUsd(); * console.log(value); // e.g., 1000 * console.log(limitLabel); // e.g., '$1k' * console.log(limitLabel); // e.g., 'no' */ export declare const useFunkitMaxCheckoutUsdInfo: () => { value: number; limitLabel: string; };