Conversation
Co-authored-by: joe10832 <103850533+joe10832@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [BUG]
Fix critical API documentation bug in configuration builder method chaining
Sep 27, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
Fixes critical API documentation bug in configuration builder method chaining order that would cause runtime errors for developers using local node functionality. The incorrect examples showed withLocalNode() being called after wallet-specific methods, which fails because wallet builders don't have the withLocalNode() method.
- Fixed method chaining order to call
withLocalNode()before wallet methods across all documentation - Corrected inconsistent package import paths in README examples
- Maintained consistency across all instruction files with proper API usage patterns
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Updated import paths from incorrect 'e2e/onchainTestKit' to correct '@coinbase/onchaintestkit' |
| .github/copilot-instructions.md | Reordered API example to show withLocalNode() before withMetaMask() |
| .github/instructions/development.instructions.md | Fixed method chaining order in local node and fork mode examples |
| .github/instructions/testing.instructions.md | Corrected builder pattern in fork testing and configuration examples |
Member
|
@copilot |
Member
|
@copilot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The documentation across all instruction files contained a critical bug in the configuration builder API examples. The examples showed an incorrect method chaining order that would cause runtime errors:
The issue is that once you call
.withMetaMask(), you get aMetaMaskConfigBuilderinstance which doesn't have awithLocalNode()method. This affected all main documentation files and would cause immediate failures for developers following the examples.Solution
Fixed the method chaining order so
withLocalNode()is called before wallet-specific methods:Changes Made
.github/copilot-instructions.md,.github/instructions/development.instructions.md, and.github/instructions/testing.instructions.md'e2e/onchainTestKit'to'@coinbase/onchaintestkit'Impact
This fix prevents runtime errors that would have affected every developer trying to use local node functionality with the documented examples. The correction ensures:
Testing
npm run build,npm run lint,npm run test)Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.