Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
10 Skipped Deployments
|
|
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Bug: Event Handling Bypasses Validation
The onAppEvent method calls its callback with raw, unvalidated data, even when safeParse fails. Despite logging a warning, it casts and passes the original data to the callback, which expects a valid W3mFrameTypes.AppEvent. This bypasses type safety and can cause runtime errors, unlike other event handlers that correctly use parsed data or skip callbacks on validation failure.
Furthermore, validation was entirely removed from postAppEvent and postFrameEvent methods. They now post events without any schema validation, potentially sending malformed data.
packages/wallet/src/W3mFrame.ts#L216-L235
appkit/packages/wallet/src/W3mFrame.ts
Lines 216 to 235 in 63009d0
Bug: Frame Event Validation Bypass
The postFrameEvent function no longer validates outgoing frame events. The W3mFrameSchema.frameEvent.parse(event) call was removed instead of being replaced with safeParse, allowing invalid or malformed events to be posted and potentially breaking the receiving side.
packages/wallet/src/W3mFrame.ts#L236-L244
appkit/packages/wallet/src/W3mFrame.ts
Lines 236 to 244 in 63009d0
Was this report helpful? Give feedback by reacting with 👍 or 👎
Description
schema.parsewith `schema.safeParse'Type of change
Associated Issues
Closes APKT-3192
Checklist