mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
fix ETH value tooltip in contract read result
This commit is contained in:
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 22 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 2.6 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 3.3 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 7.8 KiB |
@@ -5,6 +5,7 @@ import type { AbiParameter } from 'viem';
|
||||
|
||||
import { route } from 'nextjs-routes';
|
||||
|
||||
import { WEI } from 'lib/consts';
|
||||
import CopyToClipboard from 'ui/shared/CopyToClipboard';
|
||||
import LinkInternal from 'ui/shared/links/LinkInternal';
|
||||
|
||||
@@ -51,7 +52,7 @@ const ItemPrimitive = ({ abiParameter, data, level, hideLabel }: Props) => {
|
||||
|
||||
const intMatch = matchInt(abiParameter.type);
|
||||
if (intMatch && typeof data === 'bigint' && intMatch.max > INT_TOOLTIP_THRESHOLD && data > INT_TOOLTIP_THRESHOLD) {
|
||||
const dividedValue = BigNumber(data.toString()).div(BigNumber(INT_TOOLTIP_THRESHOLD));
|
||||
const dividedValue = BigNumber(data.toString()).div(WEI);
|
||||
return (
|
||||
<Tooltip label={ dividedValue.toLocaleString() + ' ETH' }>
|
||||
<span>{ castValueToString(data) }</span>
|
||||
|
||||
Reference in New Issue
Block a user