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

feat(proxy): consider contracts in /address #10

Merged
merged 2 commits into from
Nov 4, 2024

Conversation

calvogenerico
Copy link
Collaborator

What ❔

Consider contracts in /address/:address

Why ❔

Old logic was assuming that the response was always for an account. But that endpoint can also return data about a contract. We need to consider both cases with different criteria.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.

previous logic was asuming that all addresses were accounts. new logic considers contract case.
Comment on lines 87 to 89
} else {
throw new HttpError(`Unknown account type: ${data}`, 424);
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Account type is already validated to be contract or account, this code is probably never executed.

removed code that could never be executed.
@aon aon merged commit 1e76e73 into main Nov 4, 2024
@aon aon deleted the feat/better-logic-for-address-route branch November 4, 2024 18:37
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.

2 participants