-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
[explorer] Rebuild transactions for address and object #9852
[explorer] Rebuild transactions for address and object #9852
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Current dependencies on/for this PR: This comment was auto-generated by Graphite. |
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!
const tableData = genTableDataFromTxData(data); | ||
|
||
return ( | ||
<div data-testid="tx"> |
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.
is this data-testid
needed for an E2E test? if so, a more descriptive name would be nice 😄
) | ||
); | ||
|
||
return [...results[0].data, ...results[1].data].sort( |
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.
this might be a pre-mature optimization, but I recently learned about the select
option in react-query for doing data transformations which could be nice to use here
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.
That makes sense when we want to have a view over the data that we're fetching, but in this case this is defining the actual return data (basically simulating a single list). Eventually this will move to a single queryTransaction
which will also solve this problem.
4d662d5
to
d82a8a4
Compare
## Description On object and address pages, the transaction table used a deprecated method and required calling multiGetTransactions to populate. This caused it to fail for big objects / transactions. Rewriting onto native queryTransactions. For now, this has the limitation of not being able to paginate, because we need to interleave two result sets. But once the API is updated to support this filter we can pretty easily change that. ## Test Plan Ran locally.
Description
On object and address pages, the transaction table used a deprecated method and required calling multiGetTransactions to populate. This caused it to fail for big objects / transactions. Rewriting onto native queryTransactions. For now, this has the limitation of not being able to paginate, because we need to interleave two result sets. But once the API is updated to support this filter we can pretty easily change that.
Test Plan
Ran locally.