Conversation
Social SIWE never reached verifyMessage unless AppKitModalAccountButton stayed mounted. The modal already subscribed to the RPC event; it just ignored incoming requests.
AccountButton also subscribed to the same RPC event, so a mounted button plus this fix would push ApproveTransactionPage twice.
There was a problem hiding this comment.
🟡 Changes recommended
The new request-handling path can push the approval page twice when AppKitModalAccountButton is mounted because both it and the modal subscribe to the same Magic RPC request event.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR fixes a social login + SIWE flow hang by ensuring ReownAppKitModal itself reacts to incoming Magic personal_sign RPC requests and presents the Magic approval WebView page, removing the requirement to keep AppKitModalAccountButton mounted solely to drive the approval UI.
Changes:
- Listen for Magic RPC requests (not only results) in
ReownAppKitModaland open/push the Magic approval page. - Document the behavior change in
packages/reown_appkit/CHANGELOG.mdfor the next patch release.
File summaries
| File | Description |
|---|---|
| packages/reown_appkit/lib/modal/appkit_modal_impl.dart | Pushes/opens the Magic approval page when a Magic RPC request arrives. |
| packages/reown_appkit/CHANGELOG.md | Adds a 1.9.1 entry describing the SIWE + Magic approval-page fix. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
@ignaciosantise this is the social+SIWE hang from #41. The modal already listened to Magic RPC but only handled results, so I also dropped the account-button subscription so we don't push |
|
@ignaciosantise still merge-ready after catching latest develop. Please approve/apply when you can. |
Summary
Hey @ignaciosantise — this is the social+SIWE hang from #41.
Nonce and
createMessagerun, then Magicpersonal_signnever finishes unlessAppKitModalAccountButtonstays in the tree. The modal already listens toonMagicRpcRequest, but_onMagicRequestonly handled results. Incoming requests now pushApproveTransactionPagethe same way the account button does.Fixes #41
Test plan
AppKitModalAccountButton/auth/v1/authenticate/verifyMessageis called