-
Notifications
You must be signed in to change notification settings - Fork 568
[SDK] Expose getAuthToken from inApp and ecosystem wallets #7683
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] Expose getAuthToken from inApp and ecosystem wallets #7683
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 2a2a680 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 |
## Walkthrough
This update introduces new TypeScript types for in-app and ecosystem wallets, explicitly adding a `getAuthToken` method to their interfaces. Function signatures in related modules are updated to use these refined types. Minor corrections are applied to test cases, and a changeset metadata file is added to document the patch.
## Changes
| File(s) | Change Summary |
|--------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------|
| .changeset/brown-ends-strive.md | Added a changeset file documenting a patch update for exposing `getAuthToken` in wallet types. |
| packages/thirdweb/src/wallets/in-app/core/wallet/types.ts | Introduced `InAppWallet` and `EcosystemWallet` types, both with a `getAuthToken` method. |
| packages/thirdweb/src/wallets/in-app/native/ecosystem.ts | Updated return type and type assertions to use `EcosystemWallet` instead of generic `Wallet`. |
| packages/thirdweb/src/wallets/in-app/native/in-app.ts | Updated return type and type assertions to use `InAppWallet` instead of generic `Wallet`. |
| packages/thirdweb/src/wallets/in-app/web/ecosystem.ts | Updated return type and type assertions to use `EcosystemWallet` instead of generic `Wallet`. |
| packages/thirdweb/src/wallets/in-app/web/in-app.ts | Updated return type and type assertions to use `InAppWallet` instead of generic `Wallet`. |
| packages/thirdweb/src/wallets/in-app/web/lib/in-app-gateway.test.ts | Refined test cases: direct `getAuthToken` calls, corrected response handling, and updated messages. |
## Sequence Diagram(s)
```mermaid
sequenceDiagram
participant App
participant InAppWallet
participant EcosystemWallet
App->>InAppWallet: Call getAuthToken()
InAppWallet-->>App: Return string | null
App->>EcosystemWallet: Call getAuthToken()
EcosystemWallet-->>App: Return string | null Estimated code review effort2 (~15 minutes)
|
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. This stack of pull requests is managed by Graphite. Learn more about stacking. |
62d18b5
to
2a2a680
Compare
size-limit report 📦
|
PR-Codex overview
This PR focuses on enhancing wallet functionality by introducing
getAuthToken
methods forInAppWallet
andEcosystemWallet
, updating type definitions, and refining wallet creation functions to return the new types.Detailed summary
getAuthToken
method toInAppWallet
andEcosystemWallet
.inAppWallet
andecosystemWallet
functions toInAppWallet
andEcosystemWallet
, respectively.Summary by CodeRabbit
New Features
Bug Fixes
Chores