-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Fix: fixes auto-connect on native <ConnectEmbed /> component
#7650
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
[SDK] Fix: fixes auto-connect on native <ConnectEmbed /> component
#7650
Conversation
🦋 Changeset detectedLatest commit: f1cc3d6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
WalkthroughA patch was introduced to the "thirdweb" package to address an issue where the React Native Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant ConnectEmbed
participant useIsAutoConnecting
participant AutoConnect
App->>ConnectEmbed: Render with props and siweAuth
ConnectEmbed->>useIsAutoConnecting: Check if auto-connecting
alt Auto-connecting
ConnectEmbed->>ConnectEmbed: Render LoadingView
else Not auto-connecting
ConnectEmbed->>AutoConnect: Render with props if connected
ConnectEmbed->>ConnectModal: Render modal if not connected
ConnectEmbed->>AutoConnect: Render alongside modal if not connected
end
AutoConnect-->>ConnectEmbed: Handle auto-connect logic
ConnectEmbed-->>App: Render UI
sequenceDiagram
participant App
participant ConnectButton
participant AutoConnect
App->>ConnectButton: Render with props
alt autoConnect enabled
ConnectButton->>AutoConnect: Render with props
end
ConnectButton-->>App: Render button and modal UI with AutoConnect sibling
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used📓 Path-based instructions (2)**/*.{ts,tsx}Instructions used from: Sources:
**/*.{ts,tsx,js,jsx}Instructions used from: Sources:
🧠 Learnings (2)📓 Common learningspackages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx (15)🧬 Code Graph Analysis (1)packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
🔇 Additional comments (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@alecananian is attempting to deploy a commit to the thirdweb Team on Vercel. A member of the Team first needs to authorize it. |
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. |
|
@alecananian thanks for this! i've done some changes to align better how we handle this in web vs native. Could you help me test it on your end and tell me if everything works as expected? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7650 +/- ##
===========================================
- Coverage 56.43% 36.07% -20.37%
===========================================
Files 908 901 -7
Lines 58193 57696 -497
Branches 4226 2379 -1847
===========================================
- Hits 32840 20812 -12028
- Misses 25244 36807 +11563
+ Partials 109 77 -32
🚀 New features to boost your workflow:
|
|
@joaquim-verges yes, thanks! Working as expected |
Fixes #7649
Code copied from
ConnectButtoncomponent: https://github.com/thirdweb-dev/js/blob/main/packages/thirdweb/src/react/native/ui/connect/ConnectButton.tsx#L50PR-Codex overview
This PR focuses on improving the
ConnectEmbedandConnectButtoncomponents to include an auto-connect feature, enhancing user experience by automatically connecting wallets when possible.Detailed summary
useAutoConnectand replaced it withAutoConnectinConnectButton.getDefaultWalletsto provide default wallet options.autoConnectCompin bothConnectButtonandConnectEmbed.useIsAutoConnectingto manage loading state inConnectEmbed.Summary by CodeRabbit