Skip to content

Commit

Permalink
remove indexing of testnet chains
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Dec 6, 2023
1 parent 900afd0 commit 0a39b83
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
4 changes: 3 additions & 1 deletion indexers/warp-protocol/src/collectors/events/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,6 @@ const run = async (chainName: string) => {
});
};

ChainModule.supportedChains().forEach((chain) => run(chain.name));
ChainModule.supportedChains()
.filter((c) => c.name !== 'nibiru' && c.name !== 'migaloo')
.forEach((chain) => run(chain.name));
4 changes: 3 additions & 1 deletion indexers/warp-protocol/src/indexers/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ const run = async (chainName: string) => {
});
};

ChainModule.supportedChains().forEach((chain) => run(chain.name));
ChainModule.supportedChains()
.filter((c) => c.name !== 'nibiru' && c.name !== 'migaloo')
.forEach((chain) => run(chain.name));
4 changes: 3 additions & 1 deletion indexers/warp-protocol/src/indexers/jobs-tx-history/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ const run = async (chainName: string) => {
});
};

ChainModule.supportedChains().forEach((chain) => run(chain.name));
ChainModule.supportedChains()
.filter((c) => c.name !== 'nibiru' && c.name !== 'migaloo')
.forEach((chain) => run(chain.name));
4 changes: 3 additions & 1 deletion indexers/warp-protocol/src/indexers/jobs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ const run = async (chainName: string) => {
});
};

ChainModule.supportedChains().forEach((chain) => run(chain.name));
ChainModule.supportedChains()
.filter((c) => c.name !== 'nibiru' && c.name !== 'migaloo')
.forEach((chain) => run(chain.name));
18 changes: 9 additions & 9 deletions indexers/warp-protocol/src/utils/Environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ export class Environment {
}
}

if (chainName === 'migaloo') {
if (process.env.NETWORK === 'testnet') {
// testnet
return {
height: 4415456,
timestamp: 1699648200,
};
}
}
// if (chainName === 'migaloo') {
// if (process.env.NETWORK === 'testnet') {
// // testnet
// return {
// height: 4415456,
// timestamp: 1699648200,
// };
// }
// }
};

static getContractAddress(chainName: string, contract: keyof ContractAddresses) {
Expand Down

0 comments on commit 0a39b83

Please sign in to comment.