@@ -1015,6 +1015,23 @@ const listenProfileVer = async () => {
10151015 selectLeaderboard ( epoch )
10161016}
10171017
1018+ function isSpecificTime ( ) {
1019+ const targetDate = new Date ( "2024-12-20T00:00:00-08:00" ) ; // PST is UTC-8
1020+ const currentDate = new Date ( ) ;
1021+
1022+ const targetDatePST = new Date (
1023+ targetDate . toLocaleString ( "en-US" , { timeZone : "America/Los_Angeles" } )
1024+ ) ;
1025+
1026+ // Convert current date to PST
1027+ const currentDatePST = new Date (
1028+ currentDate . toLocaleString ( "en-US" , { timeZone : "America/Los_Angeles" } )
1029+ ) ;
1030+
1031+ return targetDatePST . getTime ( ) <= currentDatePST . getTime ( ) ;
1032+ }
1033+
1034+
10181035const getClaimedCntpReward = async ( ) => {
10191036 const provider = new ethers . JsonRpcProvider ( conet_rpc ) ;
10201037
@@ -1033,6 +1050,8 @@ const getClaimedCntpReward = async () => {
10331050}
10341051
10351052const getProfileAvailableCntpReward = async ( cmd ) => {
1053+ if ( ! isSpecificTime ( ) ) return ;
1054+
10361055 const walletAddress = cmd . data [ 0 ] ;
10371056
10381057 if ( ! CoNET_Data || ! walletAddress ) {
@@ -1060,6 +1079,8 @@ const getProfileAvailableCntpReward = async (cmd) => {
10601079}
10611080
10621081const claimChristmasReward = async ( cmd : any ) => {
1082+ if ( ! isSpecificTime ( ) ) return ;
1083+
10631084 const walletAddressTmp = cmd . data [ 0 ] ;
10641085 const walletAddress = ethers . getAddress ( walletAddressTmp ) ;
10651086
0 commit comments