-
Notifications
You must be signed in to change notification settings - Fork 447
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
(BIDS-2782) Remove duplicated code in two functions of eth1Account.go #2750
Conversation
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.
Please have a look at my comments.
The new withdrawals function should be kept as similar to the other address page tabs functions as possible.
E.g. the tmr
warning they have at the start can also be added.
On Prater I used this address for testing purposes since it has enough withdrawals to require a few scroll loads to show all of them but not too many so that you can actually reach the end in a few loads.
0x2fd398fc58e7193a2410bf92e47e05e1e3e24c73
When I use this one with your changes I get a "Something went wrong fetching please try again another time." at the end.
I did not test this on current master.
@Eisei24 |
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.
Please have a look at my new suggestions.
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
You can still delete the setting of Draw
and RecordsTotal
in the emptyData
if you want.
Removes identical code appearing in functions
Eth1Address()
andEth1AddressWithdrawals()
in eth1Account.go.Instead, this duplicated logic is moved into
GetAddressWithdrawals()
in db.go.I recommend the reviewer to study the modifications in
Eth1Address()
andEth1AddressWithdrawals()
before studyingGetAddressWithdrawals()
, it will help understanding.🤖[deprecated] Generated by Copilot at 1caa68c
Refactored and simplified the code for fetching and displaying eth1 address withdrawals. Used the
html/template
package and a common response type for the withdrawals table. Improved the handling of no withdrawals and currency conversion.