You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SDK]: move autoConnect function into it's own standalone function (#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 -->
0 commit comments