The new config does not work well when the display decimals value is set to 0 on the tokens config file, which as result will turn back to the default value defined in UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION.
When:
tokenMetaData.displayDecimals = 0 and
UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION = 2
tokenMetaData.displayDecimals || UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION --> this resolves to 2
When the value should be 0 as defined on the config. A possible solution could be:
The new config does not work well when the display decimals value is set to 0 on the tokens config file, which as result will turn back to the default value defined in UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION. When: tokenMetaData.displayDecimals = 0 and UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION = 2 tokenMetaData.displayDecimals || UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION --> this resolves to 2
When the value should be 0 as defined on the config. A possible solution could be:
tokenMetaData.displayDecimals !== undefined ? tokenMetaData.displayDecimals : UI_DECIMALS_DISPLAYED_DEFAULT_PRECISION;
This logic happens on util/token_meta_data.ts