BitBoxSwiss / bitbox-wallet-app

The BitBoxApp for desktop and mobile.
https://bitbox.swiss/app
Apache License 2.0
245 stars 82 forks source link

frontend: refactor transaction.tsx #2776

Closed NicolaLS closed 7 hours ago

NicolaLS commented 3 weeks ago

Refactor the transaction.tsx component to be more concise and easier to understand, also fix some minor nits like using template literals for element class names.

The PR implements all suggestions from #2549 and does not do anything else. The commits can be reviewed own their own. But the first and the third could be skipped because the changed code is moved in other commits.

The last commit moves, and changes the transaction dialog to its own component which is why everything editing something in Dialog prior to that commit can also be reviewed later in the last commit.

Please note that the many additions are caused by the license and other overhead from extracting sub-components. I think the refactor is almost addition/deletion neutral without those.

NicolaLS commented 2 weeks ago

@thisconnect rebased and applied all suggestions. the commit messages should change too for some commits now, but I'll do that after everything is reviewed.

NicolaLS commented 1 week ago

@shonsirsha thanks! rebased/applied chagnes, PTAL

NicolaLS commented 1 week ago

@shonsirsha I added one commit to fix the problem that all transactions are fetched immediately instead of when the details dialog opens, this can be in the create DetailsDialog though so we can squash it but I thought it'd be better to do it in another commit for now.

NicolaLS commented 6 days ago

(addressed nits)

NicolaLS commented 1 day ago

@thisconnect thanks :) addressed everything, PTAL