Skip to content

Commit f346b2b

Browse files
committed
fix: do not convert to bigint at latest delegations
1 parent 91c01ea commit f346b2b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/ui/delegationUpdates.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ function resolveProtocolName(protocol: DelegationDto.protocol): string {
4747
}
4848
}
4949

50-
const NumberDiff = ({ text, value }: { text: string, value: bigint }) => {
51-
if (value > 0n) {
50+
const NumberDiff = ({ text, value }: { text: string, value: number }) => {
51+
if (value > 0) {
5252
return <span style={{ color: '#50e3c2' }}>+{text}</span>
53-
} else if (value < 0n) {
53+
} else if (value < 0) {
5454
return <span style={{ color: '#ff3e55' }}>{text}</span>
5555
} else {
5656
return <span style={{ color: 'white' }}>0</span>
@@ -87,7 +87,7 @@ const DelegationUpdates = ({ data, isLoading, error }: {
8787
<div><img src={logo} width={25} /></div>
8888
<div>{resolveProtocolName(delegation.protocol)}</div>
8989
<div><HashLink address={delegation.transaction} url={url} length={5} copy={false} /></div>
90-
<div><NumberDiff value={BigInt(delegation.delegated)} text={delegated} /></div>
90+
<div><NumberDiff value={Number(delegation.delegated)} text={delegated} /></div>
9191
<div>{Formatter.relativeDate(delegation.timestamp)}</div>
9292
</React.Fragment>
9393
})}

0 commit comments

Comments
 (0)