Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix read/write contract tooltip and stubs #2452

Closed
wants to merge 1 commit into from

Conversation

aiden069
Copy link

@aiden069 aiden069 commented Dec 8, 2024

Description and Related Issue(s)

  • fix read/write contract tooltip unit
  • chart widget unit
  • stubs name, symbol and decimals

Comment on lines +14 to +16
name: config.chain.currency.name ?? '',
symbol: config.chain.currency.symbol ?? '',
decimals: config.chain.currency.decimals,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We never show data from stubs to the user; they are solely used as placeholders for rendering skeletons correctly. Therefore, we would like to keep this data static without any configuration.

@@ -25,7 +26,7 @@ const props: Props = {
],
title: 'Native coin circulating supply',
description: 'Amount of token circulating supply for the period',
units: 'ETH',
units: currencyUnits.ether,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This data is returned by the Stats microservice and cannot be configured through the frontend app's environment variables. Therefore, this change is irrelevant.

@@ -54,7 +55,7 @@ const ItemPrimitive = ({ abiParameter, data, level, hideLabel }: Props) => {
if (intMatch && typeof data === 'bigint' && intMatch.max > INT_TOOLTIP_THRESHOLD && data > INT_TOOLTIP_THRESHOLD) {
const dividedValue = BigNumber(data.toString()).div(WEI);
return (
<Tooltip label={ dividedValue.toLocaleString() + ' ETH' }>
<Tooltip label={ dividedValue.toLocaleString() + ' ' + currencyUnits.ether }>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, this value does not represent an amount of native currency. It could be any arbitrary number, such as the "total supply" of a token. So, I think using the native currency symbol here would be incorrect.

@aiden069 aiden069 closed this Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants