-
Notifications
You must be signed in to change notification settings - Fork 88
fix: fixes caching for nested objects and adds tests #3873
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
fix: fixes caching for nested objects and adds tests #3873
Conversation
Signed-off-by: Konstantina Blazhukova <[email protected]>
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
…en-added-to-cache-key
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.
…en-added-to-cache-key
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
Signed-off-by: Konstantina Blazhukova <[email protected]>
…en-added-to-cache-key
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.
looking good
Signed-off-by: Konstantina Blazhukova <[email protected]>
Co-authored-by: Luis Mastrangelo <[email protected]> Signed-off-by: konstantinabl <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
Signed-off-by: Konstantina Blazhukova <[email protected]>
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
…en-added-to-cache-key
Description:
Updated the generateCacheKey function to properly serialize nested objects using JSON.stringify()
Also removed type IArgument = Record<string, any> as it is not correctly representing what params could be passed to methods.
Related issue(s):
Fixes #3872
Testing
Notes for reviewers
Previously, the test imports were referencing modules from the dist directory. This caused incorrect behavior when checking for instances of RequestDetails in the generateCacheKey method, as the imported class was not the same as the one used in the source. By updating the imports to point to the original source files, type checks (such as instanceof RequestDetails) now behave correctly.
https://github.com/hiero-ledger/hiero-json-rpc-relay/pull/3873/files#diff-cdce3dcc7c73d10d08f1dccc43860f2b14d0feb8321935967728568ea7f2931eR7