Skip to content

Conversation

@gregfromstl
Copy link
Contributor

@gregfromstl gregfromstl commented Dec 11, 2024

PR-Codex overview

This PR introduces a new utility function getLastAuthProvider to retrieve the most recently used authentication provider from local storage. It also updates the LAST_AUTH_PROVIDER_STORAGE_KEY to be exported and includes tests for the new function.

Detailed summary

  • Added getLastAuthProvider function to retrieve the last auth provider from local storage.
  • Exported LAST_AUTH_PROVIDER_STORAGE_KEY for external use.
  • Updated tests for getLastAuthProvider to check for existing strategies and null returns.
  • Mocked webLocalStorage in tests for controlled behavior.

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

@linear
Copy link

linear bot commented Dec 11, 2024

@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2024

🦋 Changeset detected

Latest commit: f778d30

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Dec 11, 2024

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added packages SDK Involves changes to the thirdweb SDK labels Dec 11, 2024
@github-actions
Copy link
Contributor

github-actions bot commented Dec 11, 2024

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
thirdweb (esm) 44.93 KB (0%) 899 ms (0%) 2.2 s (+1.52% 🔺) 3.1 s
thirdweb (cjs) 110.71 KB (0%) 2.3 s (0%) 7.2 s (+5.29% 🔺) 9.4 s
thirdweb (minimal + tree-shaking) 5.58 KB (0%) 112 ms (0%) 293 ms (+70.71% 🔺) 405 ms
thirdweb/chains (tree-shaking) 506 B (0%) 10 ms (0%) 289 ms (+187.4% 🔺) 299 ms
thirdweb/react (minimal + tree-shaking) 19.07 KB (0%) 382 ms (0%) 674 ms (+35.43% 🔺) 1.1 s

@codecov
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.54%. Comparing base (4831926) to head (f778d30).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5697      +/-   ##
==========================================
+ Coverage   51.52%   51.54%   +0.02%     
==========================================
  Files        1093     1094       +1     
  Lines       57588    57592       +4     
  Branches     4755     4755              
==========================================
+ Hits        29671    29686      +15     
+ Misses      27200    27188      -12     
- Partials      717      718       +1     
Flag Coverage Δ *Carryforward flag
legacy_packages 65.68% <ø> (ø) Carriedforward from 4831926
packages 48.25% <100.00%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
packages/thirdweb/src/react/core/utils/storage.ts 40.00% <100.00%> (ø)
packages/thirdweb/src/react/web/utils/storage.ts 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

Copy link
Contributor Author

gregfromstl commented Dec 11, 2024

Merge activity

  • Dec 11, 2:23 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 11, 2:23 PM EST: A user added this pull request to the Graphite merge queue.
  • Dec 11, 2:33 PM EST: A user merged this pull request with the Graphite merge queue.

<!-- start pr-codex -->

## PR-Codex overview
This PR introduces a new utility function `getLastAuthProvider` to retrieve the most recently used authentication provider from local storage. It also exports the `LAST_AUTH_PROVIDER_STORAGE_KEY` for consistent access.

### Detailed summary
- Added `getLastAuthProvider` function in `packages/thirdweb/src/react/web/utils/storage.ts`.
- Exported `LAST_AUTH_PROVIDER_STORAGE_KEY` from `packages/thirdweb/src/react/core/utils/storage.ts`.
- Created tests for `getLastAuthProvider` in `packages/thirdweb/src/react/web/utils/storage.test.ts`.

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