blockscout-rs
blockscout-rs copied to clipboard
Support custom 'wei' name in charts and stats
Description
We've added an ability to customize wei
name on frontend here: https://github.com/blockscout/frontend/pull/1517
It's necessary to support it on charts and stats via NEXT_PUBLIC_NETWORK_CURRENCY_WEI_NAME
env variable
Technical view:
Json config in stats
supports templating from field template_values
:
https://github.com/sevenzing/blockscout-rs/blob/d35d07606ffdb95afa1242469f47b4e9e70293f2/stats/config/charts.json#L2
Just add variable wei_name
there and template average_gas_price chart with G{{wei_name}}
:
https://github.com/sevenzing/blockscout-rs/blob/d35d07606ffdb95afa1242469f47b4e9e70293f2/stats/config/charts.json#L198