@lifi/widget
Version:
LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.
10 lines (9 loc) • 551 B
TypeScript
/**
* Format token amount to at least 4 decimals.
* @param amount amount to format.
* @returns formatted amount.
*/
export declare const formatTokenAmount: (amount?: string, decimals?: number, decimalPlaces?: number) => string;
export declare const formatSlippage: (slippage?: string, defaultValue?: string, returnInitial?: boolean) => string;
export declare const formatInputAmount: (amount: string, decimals?: number | null, returnInitial?: boolean) => string;
export declare const formatTokenPrice: (amount?: string, price?: string) => number;