Commit 5e9d02b2 authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #1076 from blockscout/token-select-item-fix

token symbol fix
parents 5616a3eb 489f65f4
......@@ -18,7 +18,7 @@ const TokenSelectItem = ({ data }: Props) => {
switch (data.token.type) {
case 'ERC-20': {
const tokenDecimals = Number(data.token.decimals) || 18;
const text = `${ BigNumber(data.value).dividedBy(10 ** tokenDecimals).toFormat(2) } ${ data.token.symbol }`;
const text = `${ BigNumber(data.value).dividedBy(10 ** tokenDecimals).toFormat(2) } ${ data.token.symbol || '' }`;
return (
<>
......@@ -32,7 +32,7 @@ const TokenSelectItem = ({ data }: Props) => {
);
}
case 'ERC-721': {
const text = `${ BigNumber(data.value).toFormat() } ${ data.token.symbol }`;
const text = `${ BigNumber(data.value).toFormat() } ${ data.token.symbol || '' }`;
return (
<TruncatedTextTooltip label={ text }>
<chakra.span textOverflow="ellipsis" overflow="hidden">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment