File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import {
16
16
CURRENT_EPOCH_REWARDS ,
17
17
DATA_OBSERVATORY_BALANCES_URL ,
18
18
DATA_OBSERVATORY_NODES_URL ,
19
- NS_API_MIXNODES_STATS ,
20
19
NYM_ACCOUNT_ADDRESS ,
21
20
NYM_PRICES_API ,
22
21
OBSERVATORY_GATEWAYS_URL ,
@@ -174,7 +173,12 @@ export const fetchOriginalStake = async (address: string): Promise<number> => {
174
173
} ;
175
174
176
175
export const fetchNoise = async ( ) : Promise < IPacketsAndStakingData [ ] > => {
177
- const response = await fetch ( NS_API_MIXNODES_STATS , {
176
+ if ( ! process . env . NEXT_PUBLIC_NS_API_MIXNODES_STATS ) {
177
+ throw new Error (
178
+ "NEXT_PUBLIC_NS_API_MIXNODES_STATS environment variable is not defined" ,
179
+ ) ;
180
+ }
181
+ const response = await fetch ( process . env . NEXT_PUBLIC_NS_API_MIXNODES_STATS , {
178
182
headers : {
179
183
Accept : "application/json" ,
180
184
"Content-Type" : "application/json; charset=utf-8" ,
Original file line number Diff line number Diff line change 1
1
2
- export const NS_API_MIXNODES_STATS =
3
- "https://staging-node-status-api.nymte.ch/v2/mixnodes/stats" ;
4
2
export const CURRENT_EPOCH =
5
3
"https://validator.nymtech.net/api/v1/epoch/current" ;
6
4
export const CURRENT_EPOCH_REWARDS =
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ export const LineChart = ({
98
98
format : "%Y-%m-%d" ,
99
99
} }
100
100
yScale = { {
101
- min : 120000000 , // Keeping the minimum static
101
+ min : 0 , // Keeping the minimum static
102
102
max : maxYValue , // **Dynamically set max value**
103
103
type : "linear" ,
104
104
} }
You can’t perform that action at this time.
0 commit comments