/** * Copyright (c) TonTech. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * */ import { formatLargeValue, truncateDecimals } from '@ton/appkit'; export const formatAmount = (amount?: string, decimals?: number) => { const trimmed = truncateDecimals(amount || '0', Math.min(5, decimals || 9)); return formatLargeValue(trimmed, decimals); };