blockscout-rs icon indicating copy to clipboard operation
blockscout-rs copied to clipboard

Support custom 'wei' name in charts and stats

Open yvaskov opened this issue 1 year ago • 1 comments

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

Image

yvaskov avatar Feb 02 '24 09:02 yvaskov

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

sevenzing avatar Feb 02 '24 10:02 sevenzing