-
Notifications
You must be signed in to change notification settings - Fork 101
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: fix pagination for fills #5228
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -5,7 +5,7 @@ import { Trade } from 'api/operator' | |||
import { TableState, TableStateSetters } from '../../../../explorer/components/TokensTableWidget/useTable' | |||
|
|||
type CommonState = { | |||
trades: Trade[] | |||
data: Trade[] | |||
isLoading: boolean |
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.
@shoom3301 this one was hard to debug, cause the error comes from some unsafety casting done in the pagination.
I could see the context being injected:
However, because there's this type casting here:
We don't get compile errors. Basically, was assuming there will be something called data, but instead injected something called trades
This PR is about fixing the issue to get it out, but maybe we should add to the technical debt this too
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.
Got it, thanks for the information.
This context should definetely be refactored to jotai atom, at least in terms of code-base consistency.
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.
Yaaay! Thank you!
I'd add the pagination to the bottom of the table as well, but I'm already happy with the current one!
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.
To be honest, I don't get this fix.
Seems to me it's just renaming a variable (trades -> data)??
that's what it is. The code there is fragile. The better fix will be to bring typesafety there. But no capacity, so I just wanted to bring the pagination back |
Summary
Fixes the pagination for fills
Before
https://explorer-dev-git-add-double-pagination-cowswap.vercel.app/orders/0xc0688a39e9ce5ee01c49786867357811c3fcf86e27eefb072e80c9417d731bf3a53a13a80d72a855481de5211e7654fabdfe352664fd9408?tab=fills
After
Test
test for order
0xc0688a39e9ce5ee01c49786867357811c3fcf86e27eefb072e80c9417d731bf3a53a13a80d72a855481de5211e7654fabdfe352664fd9408