Merged
Conversation
hcote
previously approved these changes
Feb 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new consumer-facing callback for detecting when a connected wallet account changes and SIWE re-auth completes, wiring it from the React widget down into the extension’s silent re-auth flow.
Changes:
- Add
onAccountChangedtoMagicWidgetProps. - Add callback registration (
setAccountChangedCallbacks) toWalletKitExtensionand invoke it after silent SIWE re-auth. - Wire the prop into
MagicWidgetvia auseEffect.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| packages/@magic-ext/wallet-kit/src/types.ts | Adds the onAccountChanged prop and docs to the public widget props type. |
| packages/@magic-ext/wallet-kit/src/extension.ts | Stores account-changed callbacks and triggers them after successful silent SIWE re-auth; adds error callback support. |
| packages/@magic-ext/wallet-kit/src/MagicWidget.tsx | Registers the new callbacks on the singleton extension instance from React props. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hcote
approved these changes
Feb 26, 2026
Member
|
🚀 PR was released in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📦 Pull Request
Adds
onAccountChangedcallback to that fires when the user switches wallet accounts and re-authentication completes✅ Fixed Issues
onAccountChangedcallback🚨 Test instructions
[Describe any additional context required to test the PR/feature/bug fix.]
Please 🚨 ONLY ADD ONE 🚨 of the following labels, failing to do so may lead to adverse versioning of your changes when published:
patch: Bug Fix?minor: New Feature?major: Breaking Change?skip-release: It's unnecessary to publish this change.Special Note
Please avoid adding any of the
Prioritylabels as they conflict with the labels above ☝️📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @magic-ext/wallet-kit@0.6.0-canary.1044.22455768697.0 # or yarn add @magic-ext/wallet-kit@0.6.0-canary.1044.22455768697.0