Skip to content

Commit

Permalink
Merge pull request #917 from oasisprotocol/lw/fix-supply-detail
Browse files Browse the repository at this point in the history
Show precise Total Supply in token search result / vertical table
  • Loading branch information
lukaw3d authored Oct 3, 2023
2 parents e037445 + 598c92a commit 4926946
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .changelog/917.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show precise Total Supply in token search result / vertical table
2 changes: 1 addition & 1 deletion src/app/components/RoundedBalance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const RoundedBalance: FC<RoundedBalanceProps> = ({
},
})}
&nbsp;
{ticker}
{tickerName}
</span>
</Tooltip>
)
Expand Down
6 changes: 5 additions & 1 deletion src/app/components/Tokens/TokenDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { VerificationIcon } from '../ContractVerificationIcon'
import Box from '@mui/material/Box'
import { COLORS } from '../../../styles/theme/colors'
import { TokenTypeTag } from './TokenList'
import { getPreciseNumberFormat } from '../../../locales/getPreciseNumberFormat'

export const TokenDetails: FC<{
isLoading?: boolean
Expand Down Expand Up @@ -64,7 +65,10 @@ export const TokenDetails: FC<{
<dt>{t('tokens.totalSupply')}</dt>
<dd>
{token.total_supply
? t('tokens.totalSupplyValue', { value: token.total_supply })
? t('tokens.totalSupplyValue', {
...getPreciseNumberFormat(token.total_supply),
ticker: token.symbol,
})
: t('common.missing')}
</dd>
</StyledDescriptionList>
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
"holdersCount": "Holders Count",
"holdersCount_short": "Holders",
"totalSupply": "Total Supply",
"totalSupplyValue": "{{ value, number }}",
"totalSupplyValue": "{{ value, number }} {{ticker}}",
"transfers": "Token Transfers",
"transferEventType": {
"transfer": "Transfer",
Expand Down

0 comments on commit 4926946

Please sign in to comment.