-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix: wagmi write contract params #5317
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
Conversation
🦋 Changeset detectedLatest commit: 66a0c5c The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 packages
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
Visual Regression Test Results ✅ Passed✨ No visual changes detected Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=324 |
📦 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
When sending ERC20 tokens, there is an issue with the
writeContractmethod parameters where we get the following error when sending transactions using Wagmi adapter:As seen in
Details: Cannot convert eip155:30 to a BigInt, the Wagmi is getting the chain object with wrong parameters and finding the CAIP id from the network object. Passing the right Wagmi chain object tochainand removingchainIdparameter (Viem doesn't havechainIdparam, see docs).Steps to reproduce
*(1): Bc we use
writeContractonly when the token user want to send is ERC20, in SendController.Type of change
Associated Issues
For Linear issues: Closes APKT-4171
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
Fixes
writeContractto pass the correct Wagmi chain and updates tests; also adds Rootstock networks to lab constants.packages/adapters/wagmi/src/client.ts):writeContractto resolvewagmiChainbychain.idand pass it viachain; removechainIdusage.packages/adapters/wagmi/src/tests/client.test.ts):Addressfor typed params; assertwagmiWriteContractis called withchainand correct args.apps/laboratory/src/utils/ConstantsUtil.ts):rootstockandrootstockTestnettoEvmNetworks.@reown/appkit-adapter-wagminotingwriteContractparam fix.Written by Cursor Bugbot for commit 66a0c5c. This will update automatically on new commits. Configure here.