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

ecosystem wallet refactor (part 2) #4780

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

joaquim-verges
Copy link
Member

@joaquim-verges joaquim-verges commented Sep 24, 2024

Problem solved

Short description of the bug fixed or feature added


PR-Codex overview

This PR focuses on refactoring the wallet creation and authentication process in the thirdweb library, specifically enhancing the inApp wallet functionality and removing the get-auth-token utility.

Detailed summary

  • Deleted get-auth-token.ts and ecosystem-core.ts.
  • Refactored createWallet to use createInAppWallet.
  • Updated EcosystemWalletCreationOptions to include InAppWalletCreationOptions.
  • Replaced getAuthToken with localStorage.getAuthCookie in multiple files.
  • Modified createInAppWallet to accept an ecosystem parameter.
  • Adjusted wallet ID handling to support ecosystem ID.

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

Copy link

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

Copy link

changeset-bot bot commented Sep 24, 2024

⚠️ No Changeset found

Latest commit: de63195

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

graphite-app bot commented Sep 24, 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 September 24, 2024 03:02
Copy link
Member Author

joaquim-verges commented Sep 24, 2024

Copy link
Contributor

github-actions bot commented Sep 24, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 41.91 KB (0%) 839 ms (0%) 3.2 s (-7.5% 🔽) 4 s
thirdweb (cjs) 101.47 KB (0%) 2.1 s (0%) 6 s (+0.74% 🔺) 8 s
thirdweb (minimal + tree-shaking) 4.82 KB (0%) 97 ms (0%) 267 ms (-2.54% 🔽) 363 ms
thirdweb/chains (tree-shaking) 498 B (0%) 10 ms (0%) 85 ms (+93.46% 🔺) 95 ms
thirdweb/react (minimal + tree-shaking) 16.73 KB (0%) 335 ms (0%) 525 ms (-26.74% 🔽) 860 ms

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 68.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 49.15%. Comparing base (e2b3484) to head (de63195).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...dweb/src/wallets/in-app/core/wallet/in-app-core.ts 45.45% 6 Missing ⚠️
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4780      +/-   ##
==========================================
+ Coverage   49.11%   49.15%   +0.03%     
==========================================
  Files        1052     1051       -1     
  Lines       56786    56700      -86     
  Branches     3889     3892       +3     
==========================================
- Hits        27892    27869      -23     
+ Misses      28261    28198      -63     
  Partials      633      633              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from e2b3484
packages 45.22% <68.00%> (+0.03%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/create-wallet.ts 32.14% <100.00%> (ø)
...kages/thirdweb/src/wallets/in-app/web/ecosystem.ts 62.50% <100.00%> (+5.35%) ⬆️
packages/thirdweb/src/wallets/in-app/web/in-app.ts 62.50% <100.00%> (ø)
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 4.65% <0.00%> (-0.27%) ⬇️
...dweb/src/wallets/in-app/core/wallet/in-app-core.ts 19.67% <45.45%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

Copy link

graphite-app bot commented Sep 25, 2024

Merge activity

## Problem solved

Short description of the bug fixed or feature added

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on refactoring the `thirdweb` wallet implementation, specifically enhancing the `in-app` wallet functionality by integrating `localStorage` for authentication and modifying wallet creation methods.

### Detailed summary
- Deleted `get-auth-token.ts` and `ecosystem-core.ts`.
- Updated wallet creation to use `createInAppWallet`.
- Integrated `localStorage` for authentication in multiple files.
- Modified `EcosystemWalletCreationOptions` to include `InAppWalletCreationOptions`.
- Removed obsolete auth token fetching in various functions.

> ✨ 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