Skip to content

@swapped/connect-sdk / format / getTokenDecimals

Function: getTokenDecimals()

getTokenDecimals(token): number

Defined in: src/constants/crypto.constants.ts:702

Gets the actual token decimals (on-chain decimals) for a given token symbol. This is different from displayDecimals which is used for UI formatting.

Parameters

token

TokenSymbol

The token symbol

Returns

number

The number of decimals the token uses on-chain