@@ -80,10 +80,12 @@ const fetchBlockTimestamp = async (NEXUS_API, height) => {
8080// Hardcoded epoch ranges for supported years.
8181// These values are fixed for completed years and won't change.
8282// 2024: epoch 28809 (Jan 1 2024 01:58:02 UTC) -> epoch 37689 (Dec 31 2024 23:24:20 UTC)
83- // 2025: epoch 37690 (Jan 1 2025 00:23:11 UTC) -> ongoing (fetches latest epoch)
83+ // 2025: epoch 37690 (Jan 1 2025 00:23:11 UTC) -> epoch 46647 (Dec 31 2025 23:52:19 UTC)
84+ // 2026: epoch 46648 (Jan 1 2026 00:51:10 UTC) -> ongoing (fetches latest epoch)
8485const EPOCH_RANGES = {
8586 2024 : { startEpoch : 28808 , endEpoch : 37690 } ,
86- 2025 : { startEpoch : 37690 , endEpoch : null } , // endEpoch fetched dynamically
87+ 2025 : { startEpoch : 37690 , endEpoch : 46648 } ,
88+ 2026 : { startEpoch : 46648 , endEpoch : null } , // endEpoch fetched dynamically
8789} ;
8890
8991// Hardcoded month boundary epochs (first epoch on or after 1st of each month ~00:00 UTC)
@@ -118,7 +120,12 @@ const MONTH_EPOCHS_2025 = {
118120 10 : 44393 , // Oct 1 2025 (actual: 2025-10-01T00:13:04Z)
119121 11 : 45155 , // Nov 1 2025 (actual: 2025-11-01T00:55:48Z)
120122 12 : 45889 , // Dec 1 2025 (actual: 2025-12-01T00:16:34Z)
121- // Month 13 (Jan 1 2026) will be added when available
123+ 13 : 46648 , // End of 2025 / Jan 1 2026 (actual: 2026-01-01T00:51:10Z)
124+ } ;
125+
126+ const MONTH_EPOCHS_2026 = {
127+ 1 : 46648 , // Jan 1 2026 (actual: 2026-01-01T00:51:10Z)
128+ // Remaining months will be added as they become available
122129} ;
123130
124131/**
@@ -378,7 +385,8 @@ export const fetchStakingRewards = async (NEXUS_API, address, year, granularity,
378385 epochsToProcess . push ( endEpoch ) ;
379386 } else {
380387 // Monthly: use hardcoded month boundary epochs for accurate calendar alignment
381- const monthEpochs = year === 2024 ? MONTH_EPOCHS_2024 : MONTH_EPOCHS_2025 ;
388+ const monthEpochs =
389+ year === 2024 ? MONTH_EPOCHS_2024 : year === 2025 ? MONTH_EPOCHS_2025 : MONTH_EPOCHS_2026 ;
382390
383391 // Add month boundaries from 2 to 13 (month 1 is the baseline/start)
384392 for ( let m = 2 ; m <= 13 ; m ++ ) {
@@ -388,7 +396,7 @@ export const fetchStakingRewards = async (NEXUS_API, address, year, granularity,
388396 }
389397 }
390398
391- // For 2025 or incomplete years, ensure we include the current endEpoch if not already
399+ // For incomplete years (2026+) , ensure we include the current endEpoch if not already
392400 if ( epochsToProcess . length === 0 || epochsToProcess [ epochsToProcess . length - 1 ] < endEpoch ) {
393401 epochsToProcess . push ( endEpoch ) ;
394402 }
0 commit comments