Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: verifyFrame crashes for cast composer actions #464

Closed
1 task done
manan19 opened this issue Aug 7, 2024 · 3 comments · Fixed by #466
Closed
1 task done

bug: verifyFrame crashes for cast composer actions #464

manan19 opened this issue Aug 7, 2024 · 3 comments · Fixed by #466
Assignees

Comments

@manan19
Copy link

manan19 commented Aug 7, 2024

Describe the bug

88 |  * const data = bytesToHex(Uint8Array.from([72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33]), { size: 32 })

89 |  * // '0x48656c6c6f20576f726c64210000000000000000000000000000000000000000'

90 |  */

91 | export function bytesToHex(value, opts = {}) {

92 |     let string = '';

93 |     for (let i = 0; i < value.length; i++) {

                             ^

TypeError: undefined is not an object (evaluating 'value.length')

      at bytesToHex (/app/node_modules/frog/node_modules/viem/_esm/utils/encoding/toHex.js:93:25)

      at messageToFrameData (/app/node_modules/frog/_lib/utils/verifyFrame.js:34:19)

      at /app/node_modules/frog/_lib/middlewares/neynar.js:14:27

Cast composer actions do not have a cast and so this line fails

Link to Minimal Reproducible Example

No response

Steps To Reproduce

No response

Frog Version

latest

TypeScript Version

No response

Check existing issues

Anything else?

No response

@manan19
Copy link
Author

manan19 commented Aug 7, 2024

@dalechyn would appreciate a quick patch and release on this one. Thanks!

@dalechyn dalechyn self-assigned this Aug 8, 2024
@dalechyn
Copy link
Collaborator

dalechyn commented Aug 8, 2024

that's a neat catch, thanks! I wonder why is buttonIndex passed for backwards compatibility but cast_id not, but that's a question for another day.

@dalechyn
Copy link
Collaborator

dalechyn commented Aug 8, 2024

Can you please try frog@0.15.9-fix-wrong-parsing-of-frame-message-for-different-handlers.20240808T230644 and come back with a reply if it fixes your issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants