Skip to content

Commit

Permalink
fixed timestamp bug on vebao page (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfogg authored Nov 26, 2022
1 parent 4561309 commit 28fe8fa
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/vebao/components/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const LockStats = ({ lockInfo, timestamp }: StatsProps) => {
<Typography className='font-medium text-text-200'>Locked Until</Typography>
<>
<Typography className='ml-1 inline text-end font-bold'>
{!account || (lockInfo && lockInfo.lockEnd.mul(1000).lt(timestamp))
{!account || (lockInfo && timestamp && lockInfo.lockEnd.mul(1000).lt(timestamp))
? '-'
: new Date(lockInfo && lockInfo.lockEnd.mul(1000).toNumber()).toDateString()}
</Typography>
Expand Down Expand Up @@ -170,7 +170,7 @@ export const ProtocolStats = ({ lockInfo, timestamp, baoPrice }: StatsProps) =>
</Typography>
<>
<Typography variant='sm' className='ml-1 inline text-end font-semibold'>
{nextFeeDistribution && nextFeeDistribution.mul(1000).lte(timestamp)
{nextFeeDistribution && timestamp && nextFeeDistribution.mul(1000).lte(timestamp)
? addDays(1, new Date(nextFeeDistribution.mul(1000).toNumber())).toDateString()
: `-`}
</Typography>
Expand Down Expand Up @@ -262,7 +262,7 @@ export const ProtocolStatsHoriz = ({ lockInfo, timestamp, baoPrice }: StatsProps
</Typography>
</div>
<Typography variant='lg' className='font-bold'>
{account && nextFeeDistribution && nextFeeDistribution.mul(1000).lte(timestamp)
{account && nextFeeDistribution && timestamp && nextFeeDistribution.mul(1000).lte(timestamp)
? addDays(1, new Date(nextFeeDistribution.mul(1000).toNumber())).toDateString()
: `-`}
</Typography>
Expand Down

0 comments on commit 28fe8fa

Please sign in to comment.