Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Dec 2, 2024

Fixes #5537


PR-Codex overview

This PR focuses on enhancing the wallet connection management in the thirdweb library, specifically improving the handling of smart wallets and updating the connection logic for various API routes.

Detailed summary

  • Updated biome.json to include "noUselessElse": "off".
  • Improved smart wallet connection logic in packages/thirdweb/src/wallets/manager/index.ts.
  • Refactored wallet connection handling to prevent memory leaks.
  • Added tests for connection management in packages/thirdweb/src/wallets/manager/connection-manager.test.ts.
  • Removed dotenv configuration and environment variable logging from several API routes.

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

@linear
Copy link

linear bot commented Dec 2, 2024

@vercel
Copy link

vercel bot commented Dec 2, 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 3, 2024 1:59am
thirdweb_playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 1:59am
thirdweb-www ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 1:59am
wallet-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 3, 2024 1:59am

@changeset-bot
Copy link

changeset-bot bot commented Dec 2, 2024

🦋 Changeset detected

Latest commit: c3d7b66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
thirdweb Patch

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 2, 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 github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 2, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 47.92 KB (0%) 959 ms (0%) 377 ms (+42.32% 🔺) 1.4 s
thirdweb (cjs) 107.39 KB (0%) 2.2 s (0%) 695 ms (+17.51% 🔺) 2.9 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 105 ms (+353.72% 🔺) 217 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 14 ms (+111.43% 🔺) 24 ms
thirdweb/react (minimal + tree-shaking) 18.29 KB (+0.12% 🔺) 366 ms (+0.12% 🔺) 60 ms (+79.33% 🔺) 426 ms

@codecov
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 44.17%. Comparing base (ea855c6) to head (c3d7b66).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/thirdweb/src/wallets/manager/index.ts 93.75% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5592      +/-   ##
==========================================
+ Coverage   43.98%   44.17%   +0.18%     
==========================================
  Files        1082     1083       +1     
  Lines       56235    56276      +41     
  Branches     3954     3975      +21     
==========================================
+ Hits        24737    24858     +121     
+ Misses      30815    30735      -80     
  Partials      683      683              
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from ea855c6
packages 39.01% <93.75%> (+0.23%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/wallets/manager/index.ts 61.06% <93.75%> (+5.64%) ⬆️

... and 6 files with indirect coverage changes

Copy link
Contributor Author

gregfromstl commented Dec 2, 2024

Merge activity

  • Dec 2, 6:35 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 2, 8:45 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 2, 8:59 PM EST: A user merged this pull request with the Graphite merge queue.

"level": "error"
}
},
"noUselessElse": "off"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kinda liked this rule

Fixes #5537

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on improving wallet connection handling in the `thirdweb` project, specifically when switching signer accounts and simplifying connection logic for smart wallets.

### Detailed summary
- Updated `biome.json` to add `"noUselessElse": "off"`.
- Modified wallet connection logic in `packages/thirdweb/src/wallets/manager/index.ts` for better handling of active wallets.
- Added tests for connection management in `packages/thirdweb/src/wallets/manager/connection-manager.test.ts`.
- Removed environment variable logging across multiple API routes.

> ✨ 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 Playground Changes involving the Playground codebase. SDK Involves changes to the thirdweb SDK

Projects

None yet

Development

Successfully merging this pull request may close these issues.

useActiveAccount bug when using AA

3 participants