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

Update universalWalletConnector to include switchChain method #24

Merged
merged 16 commits into from
Feb 3, 2025

Conversation

robyn3choi
Copy link

@robyn3choi robyn3choi commented Apr 1, 2024

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • Adds the ability to switch chains when using the universal wallet connector
  • Exposes the instance of the magic SDK as a property on the connector (it lets you call connector.magic.wallet.showUI() from a React component and have it open the wallet on the newly switched chain)

What is the current behavior? (You can also link to an open issue here)

**What is the new behavior (if this is a feature change)?

  • Calling switchChain when connected with the universal wallet connector switches chains
  • Can use the connector to access the most recent instance of magic SDK (so it's always on the correct chain)

robyn3choi and others added 5 commits June 6, 2024 11:49
- Add localforage as dependency (required by @magic-sdk/provider)
- Add changeset script for better version management
- Uncomment dist/**/* in .gitignore to match upstream
- Will build dist/ during npm publish instead of committing it
Merge v2.1.1 from upstream

- Sync with upstream v2.1.1
- Update Magic SDK dependencies
- Preserve switchChain functionality
- Add prepublishOnly script
- Restore upstream .gitignore pattern
@ninemachines ninemachines requested a review from a team as a code owner January 29, 2025 00:19
ninemachines and others added 2 commits January 28, 2025 21:12
…sly, tho it seems it was not checked in), to disambiguate that this connector is for Magic wallet.
...that we used previously. This disambiguates that this is a wagmi connector for the Magic wallet.
Copy link
Member

@joshuascan joshuascan left a comment

Choose a reason for hiding this comment

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

Hi @ robyn3choi. Thanks for the PR!

Could you please revert the changes to the changelog.md (these will be handled by our publishing flow) as well as the changes to the package.json through line 26 (up through prepublishOnly)? I can then approve.

@ninemachines
Copy link

ninemachines commented Feb 1, 2025

Hi @joshuascan, thanks so much for this! I believe we've made the changes you've requested. Please let us know if you need anything else!

@joshuascan
Copy link
Member

Thanks @ninemachines! I'll merge this now and will circle back shortly with the version number once it's been published.

@joshuascan joshuascan merged commit f725827 into magiclabs:main Feb 3, 2025
@joshuascan
Copy link
Member

@robyn3choi / @ninemachines your changes have been released in version 2.1.2.

Thanks again for your contribution!

@ninemachines
Copy link

Thanks so much, @joshuascan!!

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.

3 participants