Skip to content

Commit

Permalink
add epochs to force count (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
worrex authored Nov 29, 2024
1 parent 4b467d7 commit e3422d4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions components/Pages/Bonding/RewardsComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ const RewardsComponent = ({

const bondingHasStarted: boolean = useMemo(() => genesisStartTimeInNano / 1_000_000 < Date.now(),
[genesisStartTimeInNano])
const epochsToForce = Math.floor((Date.now() - (Number(currentEpoch?.epoch?.start_time ?? 0) / 1_000_000)) /
(1_000 * 3_600 * 24))
return (
<VStack
px={8}
Expand Down Expand Up @@ -309,15 +311,15 @@ const RewardsComponent = ({
bg="transparent"
borderRadius="full"
border="1px solid white"
width="50%"
width="55%"
variant="primary"
_hover={{
border: '1px solid #6ACA70',
color: '#6ACA70',
}}
onClick={() => forceEpochAndTakeSnapshots.submit()}
>
{'Force Epoch'}
{`Force Epoch (${epochsToForce})`}
</Button>
</Tooltip>
)}
Expand Down
4 changes: 2 additions & 2 deletions components/Pages/Dashboard/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ export const Dashboard: FC = () => {
const chains = useChainInfos()
const prices = usePrices()
useEffect(() => {
const fetchDashboardData = async () => {
const circulatingWhaleSupply = dashboardData.supply?.circulating / (10 ** 6) || 0
const fetchDashboardData = () => {
const circulatingWhaleSupply = (dashboardData.supply?.circulating ?? 0) / (10 ** 6)
const marketCap = circulatingWhaleSupply * (prices?.WHALE || 0) || 0
const mappedDashboardData = []
dashboardData.dashboardData?.map((data) => {
Expand Down

0 comments on commit e3422d4

Please sign in to comment.