Skip to content

Conversation

@joaquim-verges
Copy link
Member

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

CNCT-2339


PR-Codex overview

This PR introduces EIP-1193 adapters to facilitate seamless integration between Thirdweb wallets and EIP-1193 providers, enhancing wallet functionality and allowing for better compatibility with web3 libraries.

Detailed summary

  • Added EIP1193.fromProvider() to create Thirdweb wallets from EIP-1193 providers.
  • Added EIP1193.toProvider() to convert Thirdweb wallets to EIP-1193 providers.
  • Updated various wallet configurations and IDs.
  • Enhanced wallet info generation for new wallets (social.gm2, greenhood, blazpay, abstract).
  • Improved type definitions for better TypeScript support.
  • Added tests for EIP-1193 functionality.
  • Modified wallet connection logic to support EIP-1193.

The following files were skipped due to too many changes: packages/thirdweb/src/wallets/injected/index.ts, pnpm-lock.yaml

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

@changeset-bot
Copy link

changeset-bot bot commented Nov 8, 2024

🦋 Changeset detected

Latest commit: a7c5bb0

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

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

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

@vercel
Copy link

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

@graphite-app
Copy link
Contributor

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

@socket-security
Copy link

socket-security bot commented Nov 8, 2024

No dependency changes detected. Learn more about Socket for GitHub ↗︎

👍 No dependency changes detected in pull request

@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.8 KB (+1.47% 🔺) 896 ms (+1.47% 🔺) 4.1 s (-7.78% 🔽) 5 s
thirdweb (cjs) 105.11 KB (+0.4% 🔺) 2.2 s (+0.4% 🔺) 7.5 s (+33.98% 🔺) 9.6 s
thirdweb (minimal + tree-shaking) 5.72 KB (0%) 115 ms (0%) 248 ms (+79.56% 🔺) 362 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 104 ms (-5.18% 🔽) 114 ms
thirdweb/react (minimal + tree-shaking) 18.78 KB (0%) 376 ms (0%) 505 ms (+33.32% 🔺) 881 ms

@codecov
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

Attention: Patch coverage is 44.59834% with 200 lines in your changes missing coverage. Please review.

Project coverage is 45.52%. Comparing base (040e478) to head (a7c5bb0).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...nsaction/actions/zksync/send-eip712-transaction.ts 0.00% 61 Missing ⚠️
packages/thirdweb/src/wallets/injected/index.ts 41.66% 34 Missing and 1 partial ⚠️
...ages/thirdweb/src/adapters/eip1193/from-eip1193.ts 69.90% 31 Missing ⚠️
...ckages/thirdweb/src/adapters/eip1193/to-eip1193.ts 77.21% 18 Missing ⚠️
.../web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx 0.00% 18 Missing ⚠️
...transaction/actions/to-serializable-transaction.ts 6.25% 15 Missing ⚠️
packages/thirdweb/src/utils/bigint.ts 7.69% 12 Missing ⚠️
packages/thirdweb/src/wallets/create-wallet.ts 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5354      +/-   ##
==========================================
+ Coverage   45.30%   45.52%   +0.22%     
==========================================
  Files        1068     1070       +2     
  Lines       55433    55665     +232     
  Branches     4000     4039      +39     
==========================================
+ Hits        25112    25342     +230     
- Misses      29634    29636       +2     
  Partials      687      687              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 040e478
packages 40.62% <44.59%> (+0.30%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/adapters/eip1193/index.ts 100.00% <100.00%> (ø)
...ckages/thirdweb/src/analytics/track/transaction.ts 100.00% <ø> (ø)
...web/src/react/core/hooks/wallets/useAdminWallet.ts 14.28% <ø> (ø)
packages/thirdweb/src/wallets/create-wallet.ts 26.48% <0.00%> (-0.37%) ⬇️
packages/thirdweb/src/utils/bigint.ts 58.82% <7.69%> (-31.66%) ⬇️
...transaction/actions/to-serializable-transaction.ts 76.19% <6.25%> (-23.81%) ⬇️
...ckages/thirdweb/src/adapters/eip1193/to-eip1193.ts 77.21% <77.21%> (ø)
.../web/ui/ConnectWallet/Modal/AnyWalletConnectUI.tsx 5.21% <0.00%> (ø)
...ages/thirdweb/src/adapters/eip1193/from-eip1193.ts 69.90% <69.90%> (ø)
packages/thirdweb/src/wallets/injected/index.ts 36.22% <41.66%> (+35.38%) ⬆️
... and 1 more

... and 2 files with indirect coverage changes

@edwardysun
Copy link
Contributor

leap

… support

docs: Add code examples for EIP1193 wallet adapters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Adds new functionality to the public API. packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants