-
Notifications
You must be signed in to change notification settings - Fork 567
[SDK]: move autoConnect function into it's own standalone function #5889
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
Conversation
🦋 Changeset detectedLatest commit: 7a3dff0 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. |
size-limit report 📦
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5889 +/- ##
==========================================
+ Coverage 54.83% 54.96% +0.13%
==========================================
Files 1142 1144 +2
Lines 60952 60995 +43
Branches 5138 5156 +18
==========================================
+ Hits 33422 33527 +105
+ Misses 26806 26740 -66
- Partials 724 728 +4
*This pull request uses carry forward flags. Click here to find out more.
|
Merge activity
|
…5889) --- title: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" --- https://linear.app/thirdweb/issue/TOOL-2697/add-js-autoconnect ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on refactoring the auto-connect functionality for wallets in the `thirdweb` library, enhancing the separation of concerns and improving the structure of the code. It introduces a standalone `autoConnect` function and updates various components to utilize it. ### Detailed summary - Introduced a standalone `autoConnect` function in `packages/thirdweb/src/wallets/connection/autoConnect.ts`. - Updated `useAutoConnectCore` to utilize `autoConnectCore`. - Refactored types and imports for `AutoConnectProps` to point to the new structure. - Modified tests to accommodate the new `autoConnect` implementation. - Changed wallet connection logic to improve clarity and maintainability. - Updated multiple components to use the new wallet connection logic. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
48a74ba
to
b95c119
Compare
…5889) --- title: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes" --- https://linear.app/thirdweb/issue/TOOL-2697/add-js-autoconnect ## Notes for the reviewer Anything important to call out? Be sure to also clarify these in your comments. ## How to test Unit tests, playground, etc. <!-- start pr-codex --> --- ## PR-Codex overview This PR primarily focuses on refactoring the auto-connect functionality for wallets in the `thirdweb` library. It enhances the modularity and usability of the `autoConnect` feature, allowing it to be used outside of React components and streamlining wallet connection processes. ### Detailed summary - Modified `if` condition in `timeoutPromise.ts` to check for `typeof window`. - Updated import paths for `AutoConnectProps` in `AutoConnect.tsx` files. - Exposed `autoConnect` function in `wallets.ts` for external use. - Adjusted exports in `react.ts` and `react.native.ts` for `AutoConnectProps`. - Refactored `useAutoConnectCore` to use `autoConnectCore`. - Consolidated wallet connection logic in `autoConnect` and `autoConnectCore`. - Updated tests to reflect changes in wallet connection handling and added new test cases for `autoConnect`. - Enhanced error handling and timeout logic in wallet connection processes. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
b95c119
to
7a3dff0
Compare
title: "[SDK/Dashboard/Portal] Feature/Fix: Concise title for the changes"
https://linear.app/thirdweb/issue/TOOL-2697/add-js-autoconnect
Notes for the reviewer
Anything important to call out? Be sure to also clarify these in your comments.
How to test
Unit tests, playground, etc.
PR-Codex overview
This PR primarily focuses on refactoring the
autoConnect
functionality within thethirdweb
library, enhancing its usability by exposing it as a standalone function. It also updates the import paths and types related toAutoConnectProps
.Detailed summary
autoConnect
to be a standalone function inpackages/thirdweb/src/wallets/connection/autoConnect.ts
.AutoConnectProps
to point to thewallets
directory.autoConnect
function.