@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) • 561 B
TypeScript
/**
* Format token amount to at least 6 decimals.
* @param amount amount to format.
* @returns formatted amount.
*/
export declare function formatTokenAmount(amount: bigint | undefined, decimals: number): string;
export declare function formatSlippage(slippage?: string, defaultValue?: string, returnInitial?: boolean): string;
export declare function formatInputAmount(amount: string, decimals?: number | null, returnInitial?: boolean): string;
export declare function formatTokenPrice(amount?: string | bigint, price?: string, decimals?: number): number;