Skip to content

Register Robinhood Chain in wagmi to fix switch-chain errors - #2885

Merged
Siddharth2207 merged 2 commits into
mainfrom
fix/robinhood-chain-wagmi
Sep 22, 2026
Merged

Siddharth2207 merged 2 commits into
mainfrom
fix/robinhood-chain-wagmi

Conversation

@Siddharth2207

@Siddharth2207 Siddharth2207 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wallet confirmations on Robinhood orders failed with wagmi's Chain not configured because chain ID 4663 is in rain.strategies settings but was missing from the webapp's wagmi/AppKit network list.
  • Define Robinhood Chain with viem's defineChain (RPC, ETH native currency, Blockscout explorer) and register it in supportedChainsList.
  • Add a Blockscout explorer fallback so transaction links work for 4663, which viem 2.24.3 does not ship.

Test plan

  • supportedChainsList includes Robinhood (4663) with RPC/explorer metadata
  • defaultConfig passes 4663 into both createConfig and createAppKit
  • getExplorerLink returns https://robinhoodchain.blockscout.com/tx/... for chain 4663
  • Open a Robinhood order (for example via the rain.strategies registry) and Take Order / Remove / Deposit
  • Confirm the wallet actually switches to chain 4663 instead of showing "Chain not configured"

Made with Cursor

Summary by CodeRabbit

  • New Features
    • Added support for connecting to Robinhood Chain (chain ID 4663).
    • Robinhood Chain is now available in supported network selections and wallet configuration.
    • Added support for Robinhood Chain RPC endpoints and native ETH currency details.
    • Transaction and address links now open the Robinhood Chain Blockscout explorer when applicable.
  • Tests
    • Added coverage validating Robinhood Chain configuration, wallet registration, and explorer links.

Wallet confirmations on rain.strategies Robinhood orders failed with
"Chain not configured" because 4663 was missing from the wagmi/AppKit
network list.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: rainlanguage/raindex/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 9f508db4-8ef4-4fb5-97ce-1f0a321bd544

📥 Commits

Reviewing files that changed from the base of the PR and between 8f84ea0 and 3d2862e.

📒 Files selected for processing (5)
  • packages/ui-components/src/__tests__/getExplorerLink.test.ts
  • packages/ui-components/src/lib/services/getExplorerLink.ts
  • packages/webapp/src/lib/chains.test.ts
  • packages/webapp/src/lib/chains.ts
  • packages/webapp/src/lib/stores/wagmi.test.ts

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Robinhood Chain with ID 4663 to webapp chain configuration, wagmi, and AppKit registration. It also adds a Blockscout explorer fallback in getExplorerLink and tests the chain configuration and transaction link.

Changes

Robinhood Chain support

Layer / File(s) Summary
Chain definition and registration
packages/webapp/src/lib/chains.ts, packages/webapp/src/lib/chains.test.ts, packages/webapp/src/lib/stores/wagmi.test.ts
Defines Robinhood Chain with its RPC and Blockscout settings, adds it to supported chain collections, and verifies wagmi and AppKit registration.
Explorer link fallback
packages/ui-components/src/lib/services/getExplorerLink.ts, packages/ui-components/src/__tests__/getExplorerLink.test.ts
Uses the Robinhood Blockscout URL when no default explorer is available and tests transaction link generation.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 3d286

The change registers Robinhood Chain and its explorer links with focused configuration coverage. No actionable production risk is identified, so the PR is mergeable pending normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 5…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: registering Robinhood Chain in wagmi to resolve switch-chain errors. It is concise and specific.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Siddharth2207 Siddharth2207 self-assigned this Sep 22, 2026
createConfig's chains tuple is readonly, so a direct cast to a mutable
array failed the webapp typecheck.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Siddharth2207
Siddharth2207 merged commit 3be5c09 into main Sep 22, 2026
17 of 18 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai assess this PR size classification for the totality of the PR with the following criterias and report it in your comment:

S/M/L PR Classification Guidelines:

This guide helps classify merged pull requests by effort and complexity rather than just line count. The goal is to assess the difficulty and scope of changes after they have been completed.

Small (S)

Characteristics:

  • Simple bug fixes, typos, or minor refactoring
  • Single-purpose changes affecting 1-2 files
  • Documentation updates
  • Configuration tweaks
  • Changes that require minimal context to review

Review Effort: Would have taken 5-10 minutes

Examples:

  • Fix typo in variable name
  • Update README with new instructions
  • Adjust configuration values
  • Simple one-line bug fixes
  • Import statement cleanup

Medium (M)

Characteristics:

  • Feature additions or enhancements
  • Refactoring that touches multiple files but maintains existing behavior
  • Breaking changes with backward compatibility
  • Changes requiring some domain knowledge to review

Review Effort: Would have taken 15-30 minutes

Examples:

  • Add new feature or component
  • Refactor common utility functions
  • Update dependencies with minor breaking changes
  • Add new component with tests
  • Performance optimizations
  • More complex bug fixes

Large (L)

Characteristics:

  • Major feature implementations
  • Breaking changes or API redesigns
  • Complex refactoring across multiple modules
  • New architectural patterns or significant design changes
  • Changes requiring deep context and multiple review rounds

Review Effort: Would have taken 45+ minutes

Examples:

  • Complete new feature with frontend/backend changes
  • Protocol upgrades or breaking changes
  • Major architectural refactoring
  • Framework or technology upgrades

Additional Factors to Consider

When deciding between sizes, also consider:

  • Test coverage impact: More comprehensive test changes lean toward larger classification
  • Risk level: Changes to critical systems bump up a size category
  • Team familiarity: Novel patterns or technologies increase complexity

Notes:

  • the assessment must be for the totality of the PR, that means comparing the base branch to the last commit of the PR
  • the assessment output must be exactly one of: S, M or L (single-line comment) in format of: SIZE={S/M/L}
  • do not include any additional text, only the size classification
  • your assessment comment must not include tips or additional sections
  • do NOT tag me or anyone else on your comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants