Skip to content

Conversation

@ElasticBottle
Copy link
Contributor

@ElasticBottle ElasticBottle commented Dec 4, 2024

https://linear.app/thirdweb/issue/CNCT-2497/unlink-auth-method-for-enclave-wallets


PR-Codex overview

This PR introduces the ability to unlink accounts in the in-app wallet, enhancing user account management. It includes updates to types, functions, and UI components to support this new feature.

Detailed summary

  • Added UnlinkParams type in types.ts.
  • Introduced unlinkProfile function in various connectors.
  • Updated exports to include unlinkProfile.
  • Created useUnlinkProfile hook for React.
  • Implemented unlink functionality in UI components.
  • Added tests for unlinking profiles and associated functions.

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

@linear
Copy link

linear bot commented Dec 4, 2024

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2024

🦋 Changeset detected

Latest commit: 03b6d0d

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 Dec 4, 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 Dec 12, 2024 7:12pm
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 7:12pm
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 7:12pm
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 12, 2024 7:12pm

@ElasticBottle ElasticBottle marked this pull request as draft December 4, 2024 10:57
@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 4, 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.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 4, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.94 KB (0%) 899 ms (0%) 291 ms (+176.4% 🔺) 1.2 s
thirdweb (cjs) 110.78 KB (0%) 2.3 s (0%) 412 ms (+24.98% 🔺) 2.7 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 86 ms (+642.15% 🔺) 198 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 32 ms (+452.58% 🔺) 42 ms
thirdweb/react (minimal + tree-shaking) 19.03 KB (0%) 381 ms (0%) 117 ms (+566.82% 🔺) 498 ms

@codecov
Copy link

codecov bot commented Dec 4, 2024

Codecov Report

Attention: Patch coverage is 85.29412% with 25 lines in your changes missing coverage. Please review.

Project coverage is 51.65%. Comparing base (f7e6041) to head (03b6d0d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../ui/ConnectWallet/screens/LinkedProfilesScreen.tsx 84.72% 11 Missing ⚠️
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 0.00% 8 Missing ⚠️
.../thirdweb/src/wallets/in-app/web/lib/auth/index.ts 0.00% 4 Missing ⚠️
.../wallets/in-app/core/authentication/linkAccount.ts 93.75% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5604      +/-   ##
==========================================
+ Coverage   51.53%   51.65%   +0.12%     
==========================================
  Files        1094     1097       +3     
  Lines       57592    57788     +196     
  Branches     4755     4773      +18     
==========================================
+ Hits        29681    29853     +172     
- Misses      27193    27217      +24     
  Partials      718      718              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from f7e6041
packages 48.40% <85.29%> (+0.16%) ⬆️

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

Files with missing lines Coverage Δ
...src/react/native/hooks/wallets/useUnlinkProfile.ts 100.00% <100.00%> (ø)
...eb/src/react/web/hooks/wallets/useUnlinkProfile.ts 100.00% <100.00%> (ø)
.../wallets/in-app/core/authentication/linkAccount.ts 88.65% <93.75%> (ø)
.../thirdweb/src/wallets/in-app/web/lib/auth/index.ts 1.29% <0.00%> (-0.08%) ⬇️
...irdweb/src/wallets/in-app/web/lib/web-connector.ts 0.27% <0.00%> (-0.01%) ⬇️
.../ui/ConnectWallet/screens/LinkedProfilesScreen.tsx 84.26% <84.72%> (+2.20%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Contributor Author

ElasticBottle commented Dec 12, 2024

Merge activity

  • Dec 12, 1:10 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 12, 1:12 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 12, 1:18 PM EST: The Graphite merge queue couldn't merge this PR because it was not satisfying all requirements (Failed CI: 'Vercel – thirdweb-www').
  • Dec 12, 1:18 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 12, 6:18 PM UTC: The merge label 'merge-queue' was removed. This PR will no longer be merged by the Graphite merge queue
  • Dec 12, 2:04 PM EST: The merge label 'merge-queue' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Dec 12, 2:04 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 12, 2:13 PM EST: A user merged this pull request with the Graphite merge queue.

ElasticBottle added a commit that referenced this pull request Dec 12, 2024
https://linear.app/thirdweb/issue/CNCT-2497/unlink-auth-method-for-enclave-wallets

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces functionality to unlink accounts for in-app wallets that have multiple linked profiles, enhancing user account management.

### Detailed summary
- Added `UnlinkParams` type for unlinking profiles.
- Implemented `unlinkProfile` method in various connectors.
- Updated exports to include `unlinkProfile`.
- Added hooks (`useUnlinkProfile`) for React and React Native.
- Enhanced UI components to support unlinking profiles.
- Added tests for unlinking functionality.

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

<!-- end pr-codex -->
@ElasticBottle ElasticBottle force-pushed the winston/cnct-2497-unlink-auth-method-for-enclave-wallets branch from fedc0be to 1ac03e9 Compare December 12, 2024 18:12
@graphite-app graphite-app bot removed the merge-queue Adds the pull request to Graphite's merge queue. label Dec 12, 2024
@vercel vercel bot temporarily deployed to Preview – wallet-ui December 12, 2024 18:24 Inactive
@vercel vercel bot temporarily deployed to Preview – docs-v2 December 12, 2024 18:24 Inactive
@vercel vercel bot temporarily deployed to Preview – thirdweb_playground December 12, 2024 18:24 Inactive
@ElasticBottle ElasticBottle added the merge-queue Adds the pull request to Graphite's merge queue. label Dec 12, 2024
https://linear.app/thirdweb/issue/CNCT-2497/unlink-auth-method-for-enclave-wallets

<!-- start pr-codex -->

---

## PR-Codex overview
This PR introduces functionality to unlink accounts from the in-app wallet, allowing users to manage multiple linked profiles more effectively.

### Detailed summary
- Added `UnlinkParams` type for unlinking profiles.
- Implemented `unlinkProfile` method in `InAppNativeConnector` and `InAppWebConnector`.
- Updated `unlinkAccount` function to handle profile unlinking.
- Added `useUnlinkProfile` hook for React.
- Enhanced `LinkedProfilesScreen` to include unlink buttons when multiple profiles exist.
- Added tests for unlinking functionality.

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

merge-queue Adds the pull request to Graphite's merge queue. packages SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants