-
Notifications
You must be signed in to change notification settings - Fork 124
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: use 2 instead of ORDER_BY_DESC for txs queries #265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,7 @@ def _get_txs(self, wallet_address, events_type, offset, limit, sleep_seconds): | |
"pagination.limit": limit, | ||
"pagination.offset": offset, | ||
"pagination.count_total": True, | ||
"order_by": "ORDER_BY_DESC", | ||
"order_by": 2, | ||
} | ||
|
||
if events_type == EVENTS_TYPE_SENDER: | ||
|
@@ -83,7 +83,7 @@ def get_txs(self, wallet_address, events_type, offset=0, limit=TXS_LIMIT_PER_QUE | |
elems = data["tx_responses"] | ||
next_offset = offset + limit if len(elems) == limit else None | ||
|
||
if wallet_address.startswith("evmos"): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I believe the existing code was accounting for evmos being on v0.46.x? This should handle the case where pagination is empty because post v0.46.x it is not used. After applying this fix, I was able to successfully generate a regen csv |
||
if data["pagination"] is None: | ||
total_count_txs = int(data["total"]) | ||
else: | ||
total_count_txs = int(data["pagination"]["total"]) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ def _query(cls, uri_path, query_params, sleep_seconds=1): | |
def _get_txs(cls, wallet_address, events_type, offset, limit, sleep_seconds): | ||
uri_path = "/cosmos/tx/v1beta1/txs" | ||
query_params = { | ||
"order_by": "ORDER_BY_DESC", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same question? |
||
"order_by": 2, | ||
"pagination.limit": limit, | ||
"pagination.offset": offset, | ||
"pagination.count_total": True, | ||
|
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.
Unsure if this is necessary right now? But maybe if the cosmos hub goes to v0.46.x it will be?