SHARD-2019 - Prettier lib-net#26
Merged
mhanson-github merged 3 commits intomainnet-launchfrom Mar 19, 2025
Merged
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Comment on lines
+388
to
390
| const extractUUIDHandleData = (augDataStr: string, remote: RemoteSender, header?: AppHeader, sign?: Sign) => { | ||
| // [TODO] Secure this with validation | ||
| let augData: AugmentedData = jsonParse(augDataStr, opts.customJsonParser) |
There was a problem hiding this comment.
Suggestion: Implement input validation for augDataStr before parsing it to prevent potential security vulnerabilities from malformed or malicious input. [security, importance: 8]
Suggested change
| const extractUUIDHandleData = (augDataStr: string, remote: RemoteSender, header?: AppHeader, sign?: Sign) => { | |
| // [TODO] Secure this with validation | |
| let augData: AugmentedData = jsonParse(augDataStr, opts.customJsonParser) | |
| const extractUUIDHandleData = (augDataStr: string, remote: RemoteSender, header?: AppHeader, sign?: Sign) => { | |
| if (typeof augDataStr !== 'string' || !augDataStr.trim()) { | |
| throw new Error('Invalid input data'); | |
| } | |
| let augData: AugmentedData = jsonParse(augDataStr, opts.customJsonParser) |
urnotsam
approved these changes
Mar 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Type
enhancement, formatting
Description
Applied Prettier formatting across multiple files.
Increased
printWidthin Prettier config to 120.Simplified code structure for better readability.
Updated Jest configuration for consistency.
Changes walkthrough 📝
7 files
Reformat `extractUUIDHandleData` function for readabilityReformat validation conditions for consistencyReformat setInterval function for clarityReformat promise error handling for consistencyReformat transaction object retrieval for clarityUpdate Jest configuration formattingReformat path joining for readability1 files
Increase printWidth setting to 120