chore: always send initialize event and add chainId to CONNECT_SUCCESS and CONNECT_SOCIAL_SUCCESS#4609
chore: always send initialize event and add chainId to CONNECT_SUCCESS and CONNECT_SOCIAL_SUCCESS#4609
Conversation
🦋 Changeset detectedLatest commit: f9cafed The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Skipped Deployments
|
🚨 BugBot couldn't runSomething went wrong. Try again by commenting "bugbot run", or contact support (requestId: serverGenReqId_a013a690-1e1e-442e-b2ac-51c54615291d). |
There was a problem hiding this comment.
Bug: Undefined Cast Violates Event Property Contracts
The expression ChainController.getActiveCaipNetwork()?.caipNetworkId as CaipNetworkId can result in undefined being cast to CaipNetworkId. This violates type contracts for event properties (e.g., chainId), which expect a non-nullable CaipNetworkId, potentially causing runtime errors in downstream consumers. This unsafe pattern is repeated in multiple event dispatches.
packages/scaffold-ui/src/views/w3m-email-verify-otp-view/index.ts#L43-L44
packages/controllers/src/utils/ConnectorControllerUtil.ts#L187-L192
appkit/packages/controllers/src/utils/ConnectorControllerUtil.ts
Lines 187 to 192 in 6e44ba3
packages/controllers/src/controllers/ConnectionController.ts#L383-L384
appkit/packages/controllers/src/controllers/ConnectionController.ts
Lines 383 to 384 in 6e44ba3
packages/scaffold-ui/src/partials/w3m-connecting-wc-browser/index.ts#L56-L57
packages/appkit/src/client/appkit.ts#L324-L325
appkit/packages/appkit/src/client/appkit.ts
Lines 324 to 325 in 6e44ba3
packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts#L191-L192
appkit/packages/scaffold-ui/src/views/w3m-connecting-social-view/index.ts
Lines 191 to 192 in 6e44ba3
packages/scaffold-ui/src/views/w3m-connecting-farcaster-view/index.ts#L222-L223
appkit/packages/scaffold-ui/src/views/w3m-connecting-farcaster-view/index.ts
Lines 222 to 223 in 6e44ba3
packages/scaffold-ui/src/views/w3m-connecting-external-view/index.ts#L101-L102
appkit/packages/scaffold-ui/src/views/w3m-connecting-external-view/index.ts
Lines 101 to 102 in 6e44ba3
Was this report helpful? Give feedback by reacting with 👍 or 👎
enesozturk
left a comment
There was a problem hiding this comment.
Left some comments 🙏🏽
Description
INITIALIZEeventchainIdtoCONNECT_SUCCESSandCONNECT_SOCIAL_SUCCESSType of change
Associated Issues
Closes APKT-3037
Checklist