Skip to content
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

fix: respect bundlerUrl in waitForUserReceipt #5277

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Nov 4, 2024

Problem solved

Fixes CNCT-2217


PR-Codex overview

This PR focuses on improving the thirdweb package by updating configurations, enhancing transaction receipt handling, and refining chain identification logic.

Detailed summary

  • Updated limit in .size-limit.json from 500 B to 600 B.
  • Changed options to bundlerOptions in waitForUserOpReceipt.
  • Added new chain IDs in isZkSyncChain.ts and implemented a fallback mechanism to check the stack type.
  • Renamed a test from "un-named token" to "native currency" in getWalletBalance.test.ts.

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

Copy link

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

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: 58fb28d

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

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

@joaquim-verges joaquim-verges marked this pull request as ready for review November 4, 2024 06:32
Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @joaquim-verges and the rest of your teammates on Graphite Graphite

Copy link
Contributor

github-actions bot commented Nov 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 43 KB (0%) 860 ms (0%) 461 ms (+22.78% 🔺) 1.4 s
thirdweb (cjs) 103.02 KB (0%) 2.1 s (0%) 948 ms (+17.24% 🔺) 3.1 s
thirdweb (minimal + tree-shaking) 4.85 KB (0%) 97 ms (0%) 80 ms (+310.18% 🔺) 177 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 81 ms (+1111.6% 🔺) 91 ms
thirdweb/react (minimal + tree-shaking) 17.57 KB (+3.31% 🔺) 352 ms (+3.31% 🔺) 108 ms (+106.07% 🔺) 460 ms

@@ -624,7 +624,7 @@ async function _sendUserOp(args: {
});
// wait for tx receipt rather than return the userOp hash
const receipt = await waitForUserOpReceipt({
...options,
...bundlerOptions,
Copy link
Member

@gregfromstl gregfromstl Nov 4, 2024

Choose a reason for hiding this comment

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

Are we losing anything here from options? Would it be better to do:

...options,
...bundlerOptions,
userOpHash

so all the same values are still included just in case?

Copy link
Member Author

Choose a reason for hiding this comment

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

No, should just be by doer options here. In fact I might change it to be fully explicit instead of spreading

Copy link

linear bot commented Nov 4, 2024

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 3 lines in your changes missing coverage. Please review.

Project coverage is 45.44%. Comparing base (0660416) to head (58fb28d).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...thirdweb/src/utils/any-evm/zksync/isZkSyncChain.ts 70.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5277      +/-   ##
==========================================
+ Coverage   45.37%   45.44%   +0.07%     
==========================================
  Files        1067     1067              
  Lines       55451    55459       +8     
  Branches     3992     4009      +17     
==========================================
+ Hits        25161    25206      +45     
+ Misses      29599    29562      -37     
  Partials      691      691              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 0660416
packages 40.51% <72.72%> (+0.09%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/smart/index.ts 65.56% <100.00%> (ø)
...thirdweb/src/utils/any-evm/zksync/isZkSyncChain.ts 82.14% <70.00%> (-7.86%) ⬇️

... and 1 file with indirect coverage changes

Copy link

graphite-app bot commented Nov 4, 2024

Merge activity

## Problem solved

Fixes CNCT-2217

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving the `thirdweb` package by updating configurations, modifying wallet functionalities, enhancing chain checks, and refining tests for wallet balance functionality.

### Detailed summary
- Updated `limit` in `.size-limit.json` from `500 B` to `600 B`.
- Changed `options` to `bundlerOptions` in `waitForUserOpReceipt` call.
- Added additional chain IDs in `isZkSyncChain.ts`.
- Implemented fallback to RPC stack check in `isZkSyncChain.ts`.
- Renamed test case from "should work for un-named token" to "should work for native currency" in `getWalletBalance.test.ts`.

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

Successfully merging this pull request may close these issues.

2 participants