-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: sendTransaction chain param #5338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: sendTransaction chain param #5338
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
| params: AdapterBlueprint.SendTransactionParams | ||
| ): Promise<AdapterBlueprint.SendTransactionResult> { | ||
| const { chainId, address } = getAccount(this.wagmiConfig) | ||
| const wagmiChain = this.wagmiChains?.find(chain => chain.id === chainId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Chain Mismatch Causes Transaction Instability
The wagmiChain variable can be undefined if the current chainId doesn't match any chain in this.wagmiChains. This occurs when find returns no match, potentially causing transaction failures or unexpected behavior when passed to prepareTransactionRequest and wagmiSendTransaction. The previous implementation passed chainId directly, which was more reliable.
Visual Regression Test Results ✅ Passed✨ No visual changes detected Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=367 |
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/[email protected] size /home/runner/work/appkit/appkit > size-limit |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Description
Similar to this: #5317
Type of change
Associated Issues
For Linear issues: Closes APKT-xxx
For GH issues: closes #...
Showcase (Optional)
If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.
Checklist
Note
Update
sendTransactionto pass the resolved Wagmichainobject rather thanchainId.packages/adapters/wagmi/src/client.ts):sendTransaction: resolve current chain viathis.wagmiChainsand pass aschain, removingchainIdfrom tx params.Written by Cursor Bugbot for commit 5fcde32. This will update automatically on new commits. Configure here.