-
Notifications
You must be signed in to change notification settings - Fork 621
[SDK] Show injected wallet icon when available #6871
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] Show injected wallet icon when available #6871
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: e1b341a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
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. |
size-limit report 📦
|
ead82b6 to
f003738
Compare
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (55.55%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #6871 +/- ##
=======================================
Coverage 55.21% 55.22%
=======================================
Files 896 896
Lines 57040 57055 +15
Branches 3952 3958 +6
=======================================
+ Hits 31497 31508 +11
- Misses 25446 25450 +4
Partials 97 97
🚀 New features to boost your workflow:
|
| id: WalletId; | ||
| }) { | ||
| export async function fetchWalletImage(props: { id: WalletId }) { | ||
| const { getInstalledWalletProviders } = await import( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the async import here? this will ALWAYS be hit when the function is called (not in an optional branch) so it would be more efficient to have it as part of the main bundle regardless
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because this is core, which is imported by react native and i rather not trigger this import unless i import that function if im just grabbing an icon const
| if (!id) { | ||
| throw new Error("Wallet id is required"); | ||
| } | ||
| const { getInstalledWalletProviders } = await import( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question RE async import
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same answer

Fixes TOOL-4213
PR-Codex overview
This PR introduces improvements to wallet image fetching by showing the injected wallet icon when available. It modifies the
queryFnin theuseQueryhook and updates thefetchWalletImagefunction to include dynamic imports for wallet providers.Detailed summary
queryFninuseQueryto be asynchronous and handle wallet ID validation.getInstalledWalletProvidersfrom../../../wallets/injected/mipdStore.js.fetchWalletImageto include similar changes for fetching wallet images.