Skip to content

fix: should always contain gas price info even if it's 0 #5673

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

Merged

Conversation

ElasticBottle
Copy link
Contributor

@ElasticBottle ElasticBottle commented Dec 10, 2024

https://linear.app/thirdweb/issue/CNCT-2602/issue-signing-deploy-tx-on-saakura


PR-Codex overview

This PR focuses on ensuring that gas price information is always included for enclave wallets, even when it is set to 0. It modifies the condition for checking maxFeePerGas to ensure proper handling of gas fees.

Detailed summary

  • Updated the condition for maxFeePerGas to check if it is of type bigint.
  • Ensured that gas price information is always included for enclave wallets, even if it is 0.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

linear bot commented Dec 10, 2024

Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 1:26am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 1:26am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 1:26am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 1:26am

Copy link

changeset-bot bot commented Dec 10, 2024

🦋 Changeset detected

Latest commit: c55f02f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Patch

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

Copy link
Contributor

graphite-app bot commented Dec 10, 2024

Your org has enabled the Graphite merge queue for merging into main

Add 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.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 10, 2024
Copy link
Contributor

github-actions bot commented Dec 10, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.93 KB (0%) 899 ms (0%) 197 ms (+38.51% 🔺) 1.1 s
thirdweb (cjs) 110.71 KB (0%) 2.3 s (0%) 275 ms (+26.72% 🔺) 2.5 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 62 ms (+534.05% 🔺) 174 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 6 ms (+168.13% 🔺) 16 ms
thirdweb/react (minimal + tree-shaking) 19.01 KB (0%) 381 ms (0%) 30 ms (+32.32% 🔺) 411 ms

transaction.type = 2;
} else {
transaction.gasPrice =
typeof tx.gasPrice === "bigint" ? toHex(tx.gasPrice) : undefined;
typeof tx.gasPrice === "bigint" ? toHex(tx.gasPrice) : toHex("0");
Copy link
Member

Choose a reason for hiding this comment

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

this is dangerous, a lot of tools like at the presence of gasPrice to know if its a legacy tx

we cant risk sending all values, has to be one or the other

Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 50.71%. Comparing base (e702490) to head (c55f02f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5673   +/-   ##
=======================================
  Coverage   50.71%   50.71%           
=======================================
  Files        1092     1092           
  Lines       57209    57209           
  Branches     4629     4628    -1     
=======================================
  Hits        29015    29015           
  Misses      27478    27478           
  Partials      716      716           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e702490
packages 47.20% <ø> (ø)

*This pull request uses carry forward flags. Click here to find out more.

Copy link
Contributor Author

ElasticBottle commented Dec 10, 2024

Merge activity

  • Dec 9, 7:40 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 9, 8:15 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 9, 8:27 PM EST: A user merged this pull request with the Graphite merge queue.

https://linear.app/thirdweb/issue/CNCT-2602/issue-signing-deploy-tx-on-saakura

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on ensuring that gas price information is always included for enclave wallets, even when it is 0. It modifies the condition for setting the `maxFeePerGas` to check for the type `bigint`.

### Detailed summary
- Updated the condition to check if `tx.maxFeePerGas` is of type `bigint`.
- Ensured that `transaction.maxFeePerGas` is set correctly when `tx.maxFeePerGas` is provided.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`

<!-- end pr-codex -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants