🐛 app: avoid chain mismatch on bridge transfer#978
🐛 app: avoid chain mismatch on bridge transfer#978dieguezguille wants to merge 1 commit intobasefrom
Conversation
🦋 Changeset detectedLatest commit: e552420 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughExplicitly switch the wagmi client to the source chain before submitting a bridge transfer; for non-native ERC-20 transfers include Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant UI as Bridge UI
participant Wagmi as Wagmi Client
participant Chain as Source Chain (RPC)
participant Receipt as Receipt Watcher
User->>UI: Initiate transfer
UI->>Wagmi: switchNetwork(source.chain)
Wagmi-->>UI: network switched
UI->>Wagmi: submit transfer (write, chainId: source.chain)
Wagmi->>Chain: broadcast tx
Chain-->>Wagmi: tx hash
UI->>Receipt: waitForReceipt(hash, chainId: source.chain)
Receipt->>Chain: query receipt
Chain-->>Receipt: receipt
Receipt-->>UI: receipt resolved
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
✅ All tests passed. |
7c775d1 to
e552420
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary by CodeRabbit