Skip to content

[SDK] Fix: pass gasPrice to injected provider #4935

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
merged 1 commit into from
Oct 7, 2024

Conversation

gregfromstl
Copy link
Member

@gregfromstl gregfromstl commented Oct 7, 2024

PR-Codex overview

This PR adds support for gasPrice in the transaction object handling within the injected wallet module.

Detailed summary

  • Added a new line to include gasPrice in the transaction object.
  • The gasPrice is conditionally set using numberToHex(tx.gasPrice) if tx.gasPrice exists.

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

Copy link

changeset-bot bot commented Oct 7, 2024

⚠️ No Changeset found

Latest commit: c6fbd60

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Oct 7, 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 Oct 7, 2024 7:14pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 7:14pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 7:14pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 7, 2024 7:14pm

Copy link
Contributor

graphite-app bot commented Oct 7, 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.

Copy link
Contributor

github-actions bot commented Oct 7, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.1 KB (0%) 842 ms (0%) 583 ms (+77.07% 🔺) 1.5 s
thirdweb (cjs) 101.73 KB (0%) 2.1 s (0%) 1.2 s (+20.01% 🔺) 3.2 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 39 ms (-1.89% 🔽) 136 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 93 ms (+982.87% 🔺) 103 ms
thirdweb/react (minimal + tree-shaking) 17.23 KB (0%) 345 ms (0%) 181 ms (+173.49% 🔺) 526 ms

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 47.61%. Comparing base (8e80113) to head (c6fbd60).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/injected/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4935   +/-   ##
=======================================
  Coverage   47.61%   47.61%           
=======================================
  Files        1057     1057           
  Lines       57241    57242    +1     
  Branches     3925     3927    +2     
=======================================
+ Hits        27256    27257    +1     
  Misses      29296    29296           
  Partials      689      689           
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 8e80113
packages 43.37% <0.00%> (+<0.01%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/injected/index.ts 4.80% <0.00%> (-0.03%) ⬇️

... and 1 file with indirect coverage changes

@gregfromstl gregfromstl enabled auto-merge (squash) October 7, 2024 18:57
@gregfromstl gregfromstl disabled auto-merge October 7, 2024 19:10
@gregfromstl gregfromstl added the merge-queue Adds the pull request to Graphite's merge queue. label Oct 7, 2024
Copy link
Contributor

graphite-app bot commented Oct 7, 2024

Merge activity

  • Oct 7, 3:10 PM EDT: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Oct 7, 3:10 PM EDT: gregfromstl added this pull request to the Graphite merge queue.
  • Oct 7, 3:14 PM EDT: gregfromstl merged this pull request with the Graphite merge queue.

<!-- start pr-codex -->

## PR-Codex overview
This PR introduces the handling of `gasPrice` in the transaction object within the `injected` wallet module.

### Detailed summary
- Added a new line to handle `gasPrice` in the transaction object.
- The `gasPrice` is conditionally converted to hexadecimal format using `numberToHex` if it exists.

> ✨ 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants