Skip to content

Commit

Permalink
chore: no rpc mapping for localhost
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Feb 27, 2024
1 parent b7483f7 commit 40b8c3e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ export async function useFastestRpc(app: AppState): Promise<JsonRpcProvider> {
const networkId = app.reward.networkId || app.networkId || app.claims[0].networkId;
if (!networkId) throw new Error("Network ID not found");

if (networkId === 31337)
return new JsonRpcProvider("http://127.0.0.1:8545", {
name: "http://127.0.0.1:8545",
chainId: 31337,
});

if (!isTestCompleted && !isTestStarted) {
isTestStarted = true;
await testRpcPerformance(networkId).catch(console.error);
Expand Down

0 comments on commit 40b8c3e

Please sign in to comment.