thirdweb-dev / js

Best in class web3 SDKs for Browser, Node and Mobile apps
https://thirdweb.com
Apache License 2.0
428 stars 324 forks source link

fix(ts): prepare incoming walletconnect transactions #3541

Closed gregfromstl closed 3 months ago

gregfromstl commented 3 months ago

Adding thirdwebClient to createWalletConnectClient and fulfillRequest functions to ensure proper transaction execution through WalletConnect. This update includes a refactor of handleSendTransactionRequest to utilize the new client and various other related changes for consistency.



PR-Codex overview

This PR focuses on fixing in-app wallet transaction execution via WalletConnect.

Detailed summary

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

vercel[bot] commented 3 months ago

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

Name Status Preview Comments Updated (UTC)
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 11:02pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 11:02pm
changeset-bot[bot] commented 3 months ago

🦋 Changeset detected

Latest commit: 27daf220102e3c29e867c46043fb7a17ba2830dc

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

graphite-app[bot] commented 3 months ago

Your org requires 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.

gregfromstl commented 3 months ago

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

Join @gregfromstl and the rest of your teammates on Graphite Graphite

codspeed-hq[bot] commented 3 months ago

CodSpeed Performance Report

Merging #3541 will not alter performance

Comparing fix/prepare-wc-transactions (27daf22) with main (7e24260)

Summary

✅ 9 untouched benchmarks

github-actions[bot] commented 3 months ago

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 40.8 KB (0%) 816 ms (0%) 1.3 s (+27.89% 🔺) 2.1 s
thirdweb (cjs) 91.95 KB (0%) 1.9 s (0%) 2.2 s (+7.67% 🔺) 4.1 s
thirdweb (minimal + tree-shaking) 4.79 KB (0%) 96 ms (0%) 394 ms (+410.65% 🔺) 490 ms
thirdweb/chains (tree-shaking) 423 B (0%) 10 ms (0%) 60 ms (+263.68% 🔺) 70 ms
thirdweb/react (minimal + tree-shaking) 13.51 KB (0%) 271 ms (0%) 139 ms (-44.6% 🔽) 409 ms
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 93.93939% with 2 lines in your changes missing coverage. Please review.

Project coverage is 62.48%. Comparing base (7e24260) to head (27daf22).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #3541 +/- ## ========================================== - Coverage 62.70% 62.48% -0.23% ========================================== Files 896 897 +1 Lines 68520 68814 +294 Branches 3683 3670 -13 ========================================== + Hits 42964 42996 +32 - Misses 24870 25130 +260 - Partials 686 688 +2 ``` | [Flag](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [legacy_packages](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) | `65.59% <ø> (ø)` | | Carriedforward from [7e24260](https://app.codecov.io/gh/thirdweb-dev/js/commit/7e242602e91565c62d7db1e9ba042405ac66dbc6?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) | | [packages](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) | `61.89% <93.93%> (-0.27%)` | :arrow_down: | | *This pull request uses carry forward flags. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) to find out more. | [Files](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev) | Coverage Δ | | |---|---|---| | [...nect/receiver/request-handlers/send-transaction.ts](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541?src=pr&el=tree&filepath=packages%2Fthirdweb%2Fsrc%2Fwallets%2Fwallet-connect%2Freceiver%2Frequest-handlers%2Fsend-transaction.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev#diff-cGFja2FnZXMvdGhpcmR3ZWIvc3JjL3dhbGxldHMvd2FsbGV0LWNvbm5lY3QvcmVjZWl2ZXIvcmVxdWVzdC1oYW5kbGVycy9zZW5kLXRyYW5zYWN0aW9uLnRz) | `91.66% <100.00%> (+4.48%)` | :arrow_up: | | [...wallets/wallet-connect/receiver/session-request.ts](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541?src=pr&el=tree&filepath=packages%2Fthirdweb%2Fsrc%2Fwallets%2Fwallet-connect%2Freceiver%2Fsession-request.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev#diff-cGFja2FnZXMvdGhpcmR3ZWIvc3JjL3dhbGxldHMvd2FsbGV0LWNvbm5lY3QvcmVjZWl2ZXIvc2Vzc2lvbi1yZXF1ZXN0LnRz) | `90.24% <100.00%> (+0.16%)` | :arrow_up: | | [...rdweb/src/wallets/wallet-connect/receiver/index.ts](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541?src=pr&el=tree&filepath=packages%2Fthirdweb%2Fsrc%2Fwallets%2Fwallet-connect%2Freceiver%2Findex.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev#diff-cGFja2FnZXMvdGhpcmR3ZWIvc3JjL3dhbGxldHMvd2FsbGV0LWNvbm5lY3QvcmVjZWl2ZXIvaW5kZXgudHM=) | `92.91% <83.33%> (+0.15%)` | :arrow_up: | ... and [12 files with indirect coverage changes](https://app.codecov.io/gh/thirdweb-dev/js/pull/3541/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=thirdweb-dev)
graphite-app[bot] commented 3 months ago

Merge activity