-
Notifications
You must be signed in to change notification settings - Fork 5
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
π (context-module) [DSDK-615]: Iterate on transaction calldata #563
Conversation
The latest updates on your projects. Learn more about Vercel for Git βοΈ
1 Skipped Deployment
|
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.
lgtm
const calldataDescriptor = | ||
calldata.descriptors_calldata?.[address]?.[selector]; | ||
if (!calldataDescriptor) { | ||
if (!Array.isArray(dto)) { |
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.
It's better to check the array length as well and add a test case for it. The return in line 76 and at the end of the loop have the same message, I think it's better to clarify / differentiate the known error at early step (not an array or empty), which can also help us locate where the problem is in real use case.
186e724
to
62d0721
Compare
π Description
Iterate on transaction calldata descriptors to avoid empty objects.
β Context
β Checklist
Pull Requests must pass CI checks and undergo code review. Set the PR as Draft if it is not yet ready for review.
π§ Checklist for the PR Reviewers