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

fix: issue with paging account history #143

Closed
wants to merge 4 commits into from

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Jul 5, 2024

What I did

the pager for account history was broken.
you would get to the end and it would try the next page anyway, causing a 500 error.

How I did it

if no more items, break out of the loop

How to verify it

Checklist

  • Passes all linting checks (pre-commit and CI jobs)
  • New test cases have been added and are passing
  • Documentation has been updated
  • PR title follows Conventional Commit standard (will be automatically included in the changelog)

```python
from ape import chain

history = chain.history["vitalik.eth"]
Copy link
Member Author

Choose a reason for hiding this comment

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

requires this fix: ApeWorX/ape#2170

@@ -456,10 +459,11 @@ def _get_page_of_normal_transactions(
}
result = self._get(params=params)

if not isinstance(result.value, list):
raise UnhandledResultError(result, result.value)
value = result.value or []
Copy link
Member Author

Choose a reason for hiding this comment

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

another fix: sometimes this is None and that is still 200 / ok.
for example, give it the ZERO_ADDRESS and you get this.

@antazoey antazoey marked this pull request as ready for review July 5, 2024 16:48
@antazoey antazoey requested a review from fubuloubu July 5, 2024 16:49
@@ -278,6 +278,10 @@ def get_url_f(testnet: bool = False, tld: str = "io"):
"gnosis": {
"mainnet": url("gnosisscan"),
},
"scroll": {
Copy link
Member Author

Choose a reason for hiding this comment

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

this was a miss from #137

@antazoey
Copy link
Member Author

antazoey commented Jul 5, 2024

#144

@antazoey antazoey closed this Jul 5, 2024
@antazoey antazoey deleted the docs/query branch July 11, 2024 18:27
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.

1 participant