Skip to content

Commit

Permalink
fix: update validators with only domain
Browse files Browse the repository at this point in the history
  • Loading branch information
onmax committed Nov 20, 2024
1 parent 40dcf58 commit e71cef3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/config/config.local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
prestakingStartBlock: 3_023_730,
prestakingEndBlock: 3_028_050,
transitionBlock: 3_032_010,
validatorsEndpoint: 'https://validators-api-testnet.nuxt.dev/api/v1/validators?only-known=false',
validatorsEndpoint: 'https://validators-api-testnet.nuxt.dev',
genesis: {
height: 3032010,
date: new Date('2024-11-13T20:00:00Z'),
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default {
prestakingStartBlock: 3_392_200, // 2024-10-06T02:53:18Z
prestakingEndBlock: 3_456_000, // ~2024-11-19T16:00:00Z
transitionBlock: 3_456_000,
validatorsEndpoint: 'https://validators-api-mainnet.nuxt.dev/api/v1/validators?only-known=false',
validatorsEndpoint: 'https://validators-api-mainnet.nuxt.dev',
genesis: {
height: 3456000,
date: new Date('2024-11-19T16:00:00Z'),
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.testnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default {
prestakingStartBlock: 3_023_730,
prestakingEndBlock: 3_028_050,
transitionBlock: 3_032_010,
validatorsEndpoint: 'https://validators-api-testnet.nuxt.dev/api/v1/validators?with-scores=true',
validatorsEndpoint: 'https://validators-api-testnet.nuxt.dev/',
genesis: {
height: 3032010,
date: new Date('2024-11-13T20:00:00Z'),
Expand Down
3 changes: 2 additions & 1 deletion src/network.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,9 @@ export async function launchNetwork() {
};

const { config } = useConfig();
const url = `${config.staking.validatorsEndpoint}/api/v1/validators?only-known=false`
const apiValidators = await retry<ApiValidator[]>(
() => fetch(config.staking.validatorsEndpoint).then((res) => res.json()).catch(() => []), 1000, 3,
() => fetch(url).then((res) => res.json()).catch(() => []), 1000, 3,
);
// TODO: Make it work even in the case this request fails
const validatorData: Record<string, ApiValidator> = {};
Expand Down

0 comments on commit e71cef3

Please sign in to comment.