diff --git a/explorer-v2/src/app/api/index.tsx b/explorer-v2/src/app/api/index.tsx index c9e0dbf757..687372c2f2 100644 --- a/explorer-v2/src/app/api/index.tsx +++ b/explorer-v2/src/app/api/index.tsx @@ -16,7 +16,6 @@ import { CURRENT_EPOCH_REWARDS, DATA_OBSERVATORY_BALANCES_URL, DATA_OBSERVATORY_NODES_URL, - NS_API_MIXNODES_STATS, NYM_ACCOUNT_ADDRESS, NYM_PRICES_API, OBSERVATORY_GATEWAYS_URL, @@ -174,7 +173,12 @@ export const fetchOriginalStake = async (address: string): Promise => { }; export const fetchNoise = async (): Promise => { - const response = await fetch(NS_API_MIXNODES_STATS, { + if (!process.env.NEXT_PUBLIC_NS_API_MIXNODES_STATS) { + throw new Error( + "NEXT_PUBLIC_NS_API_MIXNODES_STATS environment variable is not defined", + ); + } + const response = await fetch(process.env.NEXT_PUBLIC_NS_API_MIXNODES_STATS, { headers: { Accept: "application/json", "Content-Type": "application/json; charset=utf-8", diff --git a/explorer-v2/src/app/api/urls.ts b/explorer-v2/src/app/api/urls.ts index 6f6aaa0066..a2f439318f 100644 --- a/explorer-v2/src/app/api/urls.ts +++ b/explorer-v2/src/app/api/urls.ts @@ -1,6 +1,4 @@ -export const NS_API_MIXNODES_STATS = - "https://staging-node-status-api.nymte.ch/v2/mixnodes/stats"; export const CURRENT_EPOCH = "https://validator.nymtech.net/api/v1/epoch/current"; export const CURRENT_EPOCH_REWARDS = diff --git a/explorer-v2/src/components/lineChart/index.tsx b/explorer-v2/src/components/lineChart/index.tsx index 144aaf802f..f5adfd5637 100644 --- a/explorer-v2/src/components/lineChart/index.tsx +++ b/explorer-v2/src/components/lineChart/index.tsx @@ -98,7 +98,7 @@ export const LineChart = ({ format: "%Y-%m-%d", }} yScale={{ - min: 120000000, // Keeping the minimum static + min: 0, // Keeping the minimum static max: maxYValue, // **Dynamically set max value** type: "linear", }}