feat: add 1CA to embedded wallets #4575
Merged
svenvoskamp merged 47 commits intomainfrom Jun 30, 2025
Merged
Conversation
enesozturk
reviewed
Jun 30, 2025
Co-authored-by: Enes <enesozturk.d@gmail.com>
lukaisailovic
approved these changes
Jun 30, 2025
enesozturk
reviewed
Jun 30, 2025
enesozturk
reviewed
Jun 30, 2025
enesozturk
reviewed
Jun 30, 2025
enesozturk
approved these changes
Jun 30, 2025
Contributor
enesozturk
left a comment
There was a problem hiding this comment.
Left non blocking comments
There was a problem hiding this comment.
Bug: Invalid `chainId` Fallback Causes SIWX Errors
The chainId for siwx.createMessage() falls back to an empty string '' when ChainController.getActiveCaipNetwork()?.caipNetworkId is undefined. This empty string is an invalid CaipNetworkId (e.g., 'eip155:1') and is incorrectly type-cast, leading to potential errors or unexpected behavior during SIWX message creation and processing. The function should instead throw an error or return early if the active CAIP network is unavailable.
packages/controllers/src/utils/SIWXUtil.ts#L250-L251
appkit/packages/controllers/src/utils/SIWXUtil.ts
Lines 250 to 251 in 1b0a13e
Was this report helpful? Give feedback by reacting with 👍 or 👎
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.
Description
This PR adds 1CA flow to the embedded wallet. Instead of directly calling the
w3mFrameProvider, we now call a new introduced method in the SIWXUtil calledauthConnectorAuthenticate. This method will check ifSIWXis enabled and will then add theSIWXMessageto thew3mFrameProviderconnect method.It will also handle the signature that we get back from the
w3mFrameProviderand will add the session accordingly.More changes:
SIWXUtilmethod in clientsonSocialConnectedis triggering before we've added the session toSIWXType of change
Associated Issues
For Linear issues: Closes APKT-xxx
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