Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes wallet account handling and error messaging during bridge finalization by ensuring the EOA wallet provider and address are reliably used. The changes prevent users from encountering "unknown account #0", "[object Object]", or non-functional finalize states by removing invalid API-based fallbacks and improving error normalization.
Key Changes:
- Removed API-based finalization fallback for non-L2→L1 bridges, ensuring finalization only uses EOA wallet interaction when applicable
- Enhanced
getEthersProviderFromWagmito explicitly request wallet accounts when missing and validate account availability - Improved error normalization to extract meaningful messages from complex error objects
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| wallet-bridge-processing.tsx | Removed API-finalize fallback logic and added early return for non-L2→L1 bridges; added local error state for missing EOA wallet |
| utils.ts | Enhanced provider logic to prefer injected connectors, request accounts when empty, and improved error message extraction |
| useFinalizeBridgeFromEOA.ts | Changed to use wagmi-provided address directly with getSigner() to avoid "unknown account #0" errors |
| useBridgeFromEOA.ts | Simplified signer creation by passing eoaAddress directly to getSigner() |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
What are we changing / why:
We’re making finalize (and EOA signing) reliably use the connected wallet provider + address and request accounts when missing, while improving error normalization and removing invalid API-finalize fallbacks so users don’t hit unknown account, [object Object], or “Finalize does nothing” states.