formatValue static method
Formats a token amount to a string representation.
value
- The amount in its smallest unit (BigInt).
decimals
- The number of decimal places for the token.
Returns the string representation of the token amount (String).
Implementation
static String formatValue(
BigInt value,
int decimals,
) {
Decimal formattedValue = fromWei(value, decimals);
return formattedValue.toString();
}