-
Notifications
You must be signed in to change notification settings - Fork 620
Winston/cnct 2311 pro cannot sign transaction with in app wallet #5390
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
Winston/cnct 2311 pro cannot sign transaction with in app wallet #5390
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 6771cfe The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
size-limit report 📦
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5390 +/- ##
==========================================
- Coverage 45.32% 45.30% -0.03%
==========================================
Files 1067 1068 +1
Lines 55405 55433 +28
Branches 3999 4000 +1
==========================================
+ Hits 25111 25112 +1
- Misses 29607 29634 +27
Partials 687 687
*This pull request uses carry forward flags. Click here to find out more. |
Merge activity
|
| chainId: toHex(tx.chainId), | ||
| }; | ||
|
|
||
| if (tx.maxFeePerGas) { |
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.
shouldn't we check the type here too?
nitpick: in general i prefer checking if value !== undefined rather than typeof bigint
ee83b43 to
963a30f
Compare
## Problem solved https://linear.app/thirdweb/issue/CNCT-2311/pro-cannot-sign-transaction-with-in-app-wallet <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on improving the transaction signing process in the `enclave-wallet` by ensuring proper type checks for various transaction properties, specifically handling cases for `bigint` and `number` types. ### Detailed summary - Updated the handling of `tx.value`, `tx.gas`, `tx.nonce`, `tx.maxPriorityFeePerGas`, and `tx.gasPrice` to check their types before processing. - Ensured that `tx.value`, `tx.gas`, and `tx.maxPriorityFeePerGas` are only processed if they are of type `bigint`. - Adjusted the handling of `tx.nonce` to support both `number` and fallback to `eth_getTransactionCount`. - Maintained a 10% buffer for `tx.gas` calculations. - Updated the assignment of `transaction.maxFeePerGas` and `transaction.type` based on the presence of `tx.maxFeePerGas`. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
963a30f to
6771cfe
Compare
Problem solved
https://linear.app/thirdweb/issue/CNCT-2311/pro-cannot-sign-transaction-with-in-app-wallet
PR-Codex overview
This PR focuses on improving the transaction signing process in the
thirdwebwallet by ensuring that the types of transaction parameters are properly checked before processing them.Detailed summary
tx.value,tx.gas,tx.nonce,tx.maxPriorityFeePerGas, andtx.gasPriceto check their types before conversion to hex.tx.maxFeePerGasandtx.gasPriceare set based on type checks.tx.gas.