Skip to content

Commit c5a544f

Browse files
committed
Remove cloudflare RPCs
1 parent e78a9d6 commit c5a544f

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/App.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,11 @@ function App() {
147147
// Auto-select: race all RPCs and use the fastest one
148148
const publicRpcs =
149149
chainlistObject.rpc?.filter(
150-
(rpc) => !rpc.includes("infura.io") && !rpc.includes("${") && rpc.startsWith("http")
150+
(rpc) =>
151+
!rpc.includes("infura.io") &&
152+
!rpc.includes("cloudflare-eth.com") &&
153+
!rpc.includes("${") &&
154+
rpc.startsWith("http")
151155
) || [];
152156

153157
if (publicRpcs.length > 0) {
@@ -198,6 +202,7 @@ function App() {
198202
}));
199203
};
200204

205+
201206
const handleAddressChange = (e) => {
202207
e.preventDefault();
203208
setErrorMessage();
@@ -259,14 +264,15 @@ function App() {
259264
}
260265
}
261266
if (code === "0x") {
262-
return setErrorMessage("No contract found at the address");
267+
return setErrorMessage("No contract found at the address on chain " + provider.network.name);
263268
}
264269
setByteCode(code);
265270
decodeBytecodeCbor(code);
266271
},
267272
[address, provider]
268273
);
269274

275+
270276
const handleDecodeCustomByteCode = useCallback(
271277
(e) => {
272278
if (e) e.preventDefault();
@@ -353,7 +359,13 @@ function App() {
353359
>
354360
<option value="">Auto-select (default)</option>
355361
{chainArray[chainIndex].rpc
356-
.filter((rpc) => !rpc.includes("${") && rpc.startsWith("http"))
362+
.filter(
363+
(rpc) =>
364+
!rpc.includes("infura.io") &&
365+
!rpc.includes("cloudflare-eth.com") &&
366+
!rpc.includes("${") &&
367+
rpc.startsWith("http")
368+
)
357369
.map((rpc, i) => (
358370
<option key={i} value={rpc}>
359371
{rpc.length > 50 ? rpc.substring(0, 50) + "..." : rpc}

0 commit comments

Comments
 (0)