Skip to content

[GoodBounty] Finalize fetchAndTestRpcs fix PR #639

@L03TJ3

Description

@L03TJ3

[GoodBounty] Finalize fetchAndTestRpcs fix PR

Summary

Pick up the existing AI-generated PR #638 for fetchAndTestRpcs RPC parsing hardening, run it locally, fix implementation gaps, update tests/evidence, and prepare it for human review.

Contributor role reference:
https://docs.gooddollar.org/for-developers/contributing/open-source-contributors/contributor-role

Contributor task

  • Claim the bounty with an ETA.
  • Check out the PR branch (copilot/fix-fetch-and-test-rpcs-failure) and run it locally.
  • Compare the implementation against parent issue #637 and verify the parsing fix is robust.
  • Fix concrete gaps in behavior, tests, and code quality.
  • Leave a handoff comment with what changed, what was tested, and remaining risks.

Scope checks

Breakdown specific to the fetchAndTestRpcs parsing bug and PR #638

  • the solution should be heavily simplified and easy, not over-engineered, straight-forward
  • The PR solves the issue requirements from [Plan] Bug: fetchAndTestRpcs failing #637 (brittle parsing fails → safe parsing + deterministic fallback).
  • fetchAndTestRpcs no longer uses eval() or fragile regex on the DefiLlama JS source file.
  • FALLBACK_RPCS_BY_CHAIN is used as fallback when fetch, parse, or test fails for any chain.
  • rpcInitializationPromise is reset to null on failure so the app can retry without a full page reload.
  • rpcParsing.ts correctly extracts HTTP(S) RPC URLs for all required chains: 1, 122, 42220, 50.
  • rpcParsing.test.ts live-fetch test passes against the current DefiLlama chainlist source.
  • Existing repo patterns in src/hooks/useWeb3.tsx are respected (no unrelated changes).
  • Happy path (cache miss → fetch → parse → test → cache) and error path (fetch/parse fails → return fallback) both work end-to-end.
  • The PR description links [Plan] Bug: fetchAndTestRpcs failing #637 and includes test evidence (test output logs or screenshot).

Required commands

pnpm install
pnpm build
pnpm lint
pnpm test

If a command cannot be run, document why.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

Status

Deploy and Verify

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions