Skip to content

Commit

Permalink
chore: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
camewell071 committed Jan 31, 2024
1 parent 497db3f commit 367a2ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
2 changes: 0 additions & 2 deletions src/modules/PublicSale/activities/hooks/useTradeNakaData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import { daySecondSelector } from '@/stores/states/activities/selector';

const useTradeNakaData = () => {
const { topWinners, bestPNL } = useAppSelector(daySecondSelector);
console.log('SANG TEST: ', bestPNL);

return {
topWinners,
bestPNL
Expand Down
19 changes: 12 additions & 7 deletions src/modules/PublicSale/activities/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Good luck and have fun!
},
],
desc: 'NakaChain is a low-cost and lightning-fast Bitcoin Layer 2 blockchain designed for DeFi apps, enabling the payment of gas fees in Bitcoin. It’s powered by BVM with these modules: Bitcoin for security, Polygon for data availability, and Optimism for execution.' +
'<br/><br/>On the second day of awesomeness, challenge yourself to dominate the market by trading futures on BRC-20 tokens\' prices. The top gainer will be rewarded every hour.' +
'<br/><br/>On the second day of awesomeness, challenge yourself to dominate the market by trading futures on BRC-20 tokens\' prices. The top gainer will be rewarded every 2 hours.' +
'<br/><br/>Total rewards: <span style="color: #FA4E0E">$3,000</span>',
},
{
Expand Down Expand Up @@ -147,12 +147,17 @@ Good luck and have fun!
}, [isOpenNakaWinners]);

const currentDay = React.useMemo(() => {
// const diffDay = new BigNumber(
// dayjs.utc(PUBLIC_SALE_START).diff(dayjs.utc(), 'days'),
// )
// .absoluteValue()
// .toNumber();
const diffDay = 0;
let diffDay = new BigNumber(
dayjs.utc(PUBLIC_SALE_START).diff(dayjs.utc(), 'days'),
)
.absoluteValue()
.toNumber();

// Case naka start at 4h UTC
if (diffDay === 1 && dayjs.utc().hour() < 4) {
diffDay = 0;
}

return {
step: DAYS.length > diffDay ? DAYS[diffDay] : DAYS[DAYS.length - 1],
diffDay,
Expand Down

0 comments on commit 367a2ef

Please sign in to comment.