Skip to content

Conversation

@0xFirekeeper
Copy link
Member

@0xFirekeeper 0xFirekeeper commented Oct 25, 2024

Problem solved

Generally verificationGas is not a thing, but just in case it is with some bundlers, making it optional so it doesn't throw "Cannot convert undefined to a BigInt"


PR-Codex overview

This PR modifies the EstimationResult type and its usage in the bundler.ts file to make the verificationGas property optional. This change allows for better handling of cases where verificationGas may not be present.

Detailed summary

  • In types.ts, changed verificationGas from a required property to an optional property (verificationGas?: bigint).
  • In bundler.ts, updated the return statement to check if res.verificationGas is defined before converting it with hexToBigInt, returning undefined if not present.

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

Generally verificationGas is not a thing, but just in case it is with some bundlers, making it optional so it doesn't throw "Cannot convert undefined to a BigInt"
@changeset-bot
Copy link

changeset-bot bot commented Oct 25, 2024

⚠️ No Changeset found

Latest commit: 142d77e

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

@vercel
Copy link

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 25, 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
Copy link
Contributor

github-actions bot commented Oct 25, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 42.9 KB (0%) 859 ms (0%) 953 ms (+31% 🔺) 1.9 s
thirdweb (cjs) 102.73 KB (0%) 2.1 s (0%) 1.5 s (-14.73% 🔽) 3.5 s
thirdweb (minimal + tree-shaking) 4.84 KB (0%) 97 ms (0%) 34 ms (-51.03% 🔽) 131 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 207 ms (+612.09% 🔺) 217 ms
thirdweb/react (minimal + tree-shaking) 17.34 KB (0%) 347 ms (0%) 147 ms (+8.49% 🔺) 494 ms

@codecov
Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 45.36%. Comparing base (a365dd8) to head (142d77e).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/smart/lib/bundler.ts 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5184      +/-   ##
==========================================
- Coverage   45.36%   45.36%   -0.01%     
==========================================
  Files        1068     1068              
  Lines       55230    55233       +3     
  Branches     3970     3971       +1     
==========================================
  Hits        25055    25055              
- Misses      29483    29486       +3     
  Partials      692      692              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from a365dd8
packages 40.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/smart/types.ts 69.04% <ø> (ø)
packages/thirdweb/src/wallets/smart/lib/bundler.ts 41.87% <0.00%> (-0.81%) ⬇️

@joaquim-verges joaquim-verges merged commit 771acd1 into main Oct 28, 2024
29 of 30 checks passed
@joaquim-verges joaquim-verges deleted the firekeeper/fix-op-estimation branch October 28, 2024 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants