-
Notifications
You must be signed in to change notification settings - Fork 192
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
feat: factor out parseFrameMessage #29
Conversation
if (result.isOk() && result.value.valid && result.value.message) { | ||
validatedMessage = result.value.message; | ||
} | ||
const validatedMessage = await parseFrameMessage(body); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we want to make this a param? That way if you're parsing the message to get other data anyway you can just pass the result in to this function rather than loading same data twice. Could do this with an overload
cdd1d6e
to
6650977
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DOOOPE!!!
As follow up would you mind add this in the README with a nice example on how to use it.
After that I will cut a new release.
Ehm @robpolak's tests are broken in this PR edit: actually maybe they were already broken? Looks like the mock always returns a user from Neynar so the second test will always fail? |
😅 @cnasc can you help us get on a solid testing case, so that we can add it in CI, and than deploy, please. Ideally would be dope to release a new OnchainKit version in the next couple of hours. |
What changed? Why?
While working with frames, it's beneficial to be able to get the whole validated message. Since we parse and validate the message as part of
getFrameAccountAddress
, I pulled the relevant code out into a new function.Notes to reviewers
How has it been tested?
yolo'd this, would love to hear any strategies for testing
edit: did manually test in a frame by copying code over and it appears to work