Skip to content

fix(wallet/bridge): bridge finalize wallet account handling and error UX#3490

Merged
domw30 merged 2 commits intomainfrom
fix/bridge-finalize-wallet-account-handling-and-error-UX
Dec 18, 2025
Merged

fix(wallet/bridge): bridge finalize wallet account handling and error UX#3490
domw30 merged 2 commits intomainfrom
fix/bridge-finalize-wallet-account-handling-and-error-UX

Conversation

@domw30
Copy link
Copy Markdown
Collaborator

@domw30 domw30 commented Dec 18, 2025

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.

@vercel
Copy link
Copy Markdown

vercel bot commented Dec 18, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
z-os Ready Ready Preview Dec 18, 2025 1:14am

@domw30 domw30 requested a review from Copilot December 18, 2025 00:58
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 getEthersProviderFromWagmi to 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.

@domw30 domw30 merged commit bae534c into main Dec 18, 2025
7 checks passed
@domw30 domw30 deleted the fix/bridge-finalize-wallet-account-handling-and-error-UX branch December 18, 2025 01:20
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