-
Notifications
You must be signed in to change notification settings - Fork 43
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: updated paginated deposits table #909
Conversation
ACX-1623 Implement new consistent transactions table components
Should be generic and reusable for /transactions, /referrals and /op-rebates pages. Only implement via Storybook |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Math.abs( | ||
DateTime.fromSeconds(deposit.depositTime).diffNow("seconds").as("seconds") | ||
) > MAX_PENDING_STATE_TIME_UNTIL_SLOW; |
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.
Should we allow any instance of future deposits to show in the FE? We avoid this in the relayer/SDK
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.
Can you explain what future deposits are?
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.
Deposits whose time occurs in the future - so when DateTime.fromSeconds(deposit.depositTime).diffNow("seconds").as("seconds")
is negative
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.
The Scraper derives the deposit date from the block timestamp of the deposit tx. So there shouldn't be cases of future deposits, no?
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.
Something to note here is that diffNow
uses the formula
DATE_ARG - NOW
i.e. if the passed-in date is in the past then it is negative. That's why I am using Math.abs
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.
Ah I see, if we would never see future deposits, is the Math.abs(...)
on the diff just for convenience?
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.
If the deposit timestamp is in the past diffNow
always returns a negative number actually. Because it uses
depositTime - nowTime
That's why I need that Math.abs
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.
Left a few comments
fba48dc
to
741f556
Compare
17fd21e
to
2b3381f
Compare
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.
One outstanding thread: #909 (comment)
2b3381f
to
3604c25
Compare
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.
Approving but still curious about that Math.abs
Add a paginated variant of the new deposits table. Also only testable via Storybook.
Closes ACX-1623