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

Refactor: Add transformResponse function for safe JSON parsing #13

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

arhamj
Copy link
Contributor

@arhamj arhamj commented Jun 17, 2024

Task: https://linear.app/shm/issue/GOLD-126

This pull request adds a new function, transformResponse, to safely parse JSON responses. This function is used in the queryFromDistributor function to ensure that the response is properly parsed. This improves the reliability and security of the code.

Copy link

linear bot commented Jun 17, 2024

GOLD-126 The EOA_codehash check in the explorer is breaking

ISSUE SUMMARY:

Due to recent serialization changes added in the explorer, it seems thatthe check to determine whether an account is a user or contract account has malfunctioned, resulting in all accounts being assumed as contract account.

bytesToHex(Uint8Array.from(Object.values(accObj.account.account.codeHash))) !== EOA_CodeHash

<<TODO: Replace this with a short summary of the issue.>>


ISSUE REPRO STEPS:

<HINT: Add steps to list as-needed. If interaction is complex, add screenshots or a Slack screen-capture video (just drag and drop)>

  1. <<TODO: Replace with repro step Bump the npm_and_yarn group across 1 directory with 8 updates #1>>
  2. <<TODO: Replace with repro step Bump the npm_and_yarn group across 1 directory with 9 updates #2>>
  3. Observe <<TODO: Describe unintended behavior.>>

EXPECTED RESULT:

<<TODO: Replace this with your expected results.>>


PULL REQUESTS:

<HINT: If your fix requires changes in multiple repos, add the following info per-repository.>

<<TODO: Enter Repository Name>>

Pull Request Link: <<TODO: Insert PR-LINK>>

GPT Review Link: <<TODO: Insert GPT-Review-Link>>

Jenkins Test Link: <<TODO: Insert Jenkins Test Job Link>>


ADDITIONAL INSTRUCTIONS:

<HINT: Add any additional instructions needed for the assignee. If you have specific requirements for how the task should be implemented or fixed, enter them or link them here.>

<<TODO: Insert additional instructions for assignee.>>

@jairajdev jairajdev merged commit 6083c66 into dev Jun 17, 2024
2 checks passed
@jairajdev jairajdev deleted the GOLD-126 branch June 17, 2024 10:00
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 this pull request may close these issues.

3 participants