Skip to content

Commit

Permalink
Merge pull request #179 from molecula451/blacklist-bye
Browse files Browse the repository at this point in the history
chore: remove blacklist
  • Loading branch information
0x4007 authored Feb 27, 2024
2 parents 123f178 + ea0baff commit 6713c16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
30 changes: 2 additions & 28 deletions build/esbuild-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,9 @@ export const entries = [...typescriptEntries, ...cssEntries];
const allNetworkUrls: Record<string, string[]> = {};
// 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];
});

Expand Down
2 changes: 1 addition & 1 deletion static/scripts/rewards/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const networkExplorers: Record<number, string> = {
export const networkRpcs: Record<number, string[]> = {
[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", ""],
};

Expand Down

0 comments on commit 6713c16

Please sign in to comment.