Skip to content

Commit

Permalink
one network at a time
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Oct 28, 2022
1 parent b17faef commit 9211435
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/scripts/fetchAllRewarders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,16 @@ export const fetchAllRewarders = async (network: Network): Promise<void> => {
);
};

Promise.all([
fetchAllRewarders("mainnet-beta"),
fetchAllRewarders("devnet"),
]).catch((err) => {
(async () => {
if (process.env.NETWORK) {
await fetchAllRewarders(process.env.NETWORK as Network);
} else {
await Promise.all([
fetchAllRewarders("mainnet-beta"),
fetchAllRewarders("devnet"),
]);
}
})().catch((err) => {
console.error(err);
process.exit(1);
});

0 comments on commit 9211435

Please sign in to comment.