Skip to content
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

fix(solana): injected connectors not detected #2656

Merged
merged 6 commits into from
Aug 7, 2024

Conversation

enesozturk
Copy link
Contributor

@enesozturk enesozturk commented Aug 6, 2024

Description

Wallet Standard's on listener is not getting triggered when MM is disabled but other extensions like Trust or Phantom is enabled. This causing an issue that the none of the injected wallets are getting visible in connector list if MM is not installed or disabled.

This PR introduces a slight changes to the watchStandard method to make sure it's passing the available options to it's callback parameter.

Also adding a tests that checks the MM option in the injected connectors list.

While this resolving the issue, like to double checking the issue with the Wallet Standard team here: wallet-standard/wallet-standard#109

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-845
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections

Copy link

vercel bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
web3modal-gallery ✅ Ready (Inspect) Visit Preview Aug 7, 2024 4:34pm
web3modal-laboratory ✅ Ready (Inspect) Visit Preview Aug 7, 2024 4:34pm

Copy link

linear bot commented Aug 6, 2024

@enesozturk
Copy link
Contributor Author

@glitch-txs I'd like to get your thoughts on this. I'm still not quite clear if it's an issue on the Wallet Standard. I'll double check their source code and might open an issue on their repo to ask to WS team.

@enesozturk enesozturk changed the title fix/solana injected connectors not detected fix(solana): injected connectors not detected Aug 6, 2024
@@ -25,6 +25,8 @@ export function watchStandard(callback: (arg: StandardWalletAdapter[]) => void)
})
]

callback(standardAdapters)
Copy link
Collaborator

Choose a reason for hiding this comment

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

is this a default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

While setting the event listeners, this allow us to trigger the callback with initial data of available wallets.

is this a default?
Not sure what you mean, but the Wallet Standard don't have this or idk why they don't trigger at once if MM is disabled. Asked here

@enesozturk enesozturk merged commit 605273d into main Aug 7, 2024
11 checks passed
@enesozturk enesozturk deleted the fix/solana-injected-connectors-not-detected branch August 7, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants