Home > @primitivefi/rmm-sdk > validateDecimals
This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Checks if amount.decimals
is equal to token.decimals
.
Signature:
export declare function validateDecimals(amount: Wei, token: Token): void;
Parameter | Type | Description |
---|---|---|
amount | Wei | Amount as a Wei class to compare the decimals of to token.decimals . |
token | Token | Token to check the amount against for the same decimals. |
Returns:
void
Throws if token decimals are not equal.