From ea0baff22813549853aff97c24d6b3bdbd3a1fd2 Mon Sep 17 00:00:00 2001 From: molecula451 Date: Mon, 26 Feb 2024 22:54:54 -0400 Subject: [PATCH] chore: remove blacklist --- build/esbuild-build.ts | 30 ++--------------------------- static/scripts/rewards/constants.ts | 2 +- 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/build/esbuild-build.ts b/build/esbuild-build.ts index f6dcd5fd..97ebd5e2 100644 --- a/build/esbuild-build.ts +++ b/build/esbuild-build.ts @@ -14,35 +14,9 @@ export const entries = [...typescriptEntries, ...cssEntries]; const allNetworkUrls: Record = {}; // this flattens all the rpcs into a single object, with key names that match the networkIds. The arrays are just of URLs per network ID. -const blacklist = ["https://xdai-archive.blockscout.com", "https://gnosis.api.onfinality.io/public"]; - Object.keys(extraRpcs).forEach((networkId) => { - const officialUrls = extraRpcs[networkId].rpcs.filter((rpc) => { - if (typeof rpc === "string") { - if (blacklist.includes(rpc)) { - return null; - } else { - return rpc; - } - } - }); - const extraUrls: string[] = extraRpcs[networkId].rpcs - .filter((rpc) => rpc.url !== undefined) - .map((rpc) => { - if (typeof rpc === "string") { - if (blacklist.includes(rpc)) { - return ""; - } else { - return rpc; - } - } else { - if (blacklist.includes(rpc.url)) { - return ""; - } else { - return rpc.url; - } - } - }); + const officialUrls = extraRpcs[networkId].rpcs.filter((rpc) => typeof rpc === "string"); + const extraUrls: string[] = extraRpcs[networkId].rpcs.filter((rpc) => rpc.url !== undefined).map((rpc) => rpc.url); allNetworkUrls[networkId] = [...officialUrls, ...extraUrls]; }); diff --git a/static/scripts/rewards/constants.ts b/static/scripts/rewards/constants.ts index b298c161..891a6513 100644 --- a/static/scripts/rewards/constants.ts +++ b/static/scripts/rewards/constants.ts @@ -48,7 +48,7 @@ export const networkExplorers: Record = { export const networkRpcs: Record = { [NetworkIds.Mainnet]: ["https://rpc-pay.ubq.fi/v1/mainnet", ...(extraRpcs[NetworkIds.Mainnet] || [])], [NetworkIds.Goerli]: ["https://rpc-pay.ubq.fi/v1/goerli", ...(extraRpcs[NetworkIds.Goerli] || [])], - [NetworkIds.Gnosis]: [...(extraRpcs[NetworkIds.Gnosis] || [])], + [NetworkIds.Gnosis]: ["https://rpc.ankr.com/gnosis", ...(extraRpcs[NetworkIds.Gnosis] || [])], [NetworkIds.Anvil]: ["http://127.0.0.1:8545", ""], };