Page MenuHomePhabricator

[electrum] move-only: extract MyTreeWidget and related code to its own module
ClosedPublic

Authored by PiRK on Jun 30 2023, 14:58.

Details

Summary

util.py has grown big, and the tree widget base class is used for the main widgets in the application (tx history, coins, addresses...) so it deserves to its own module.

The payment request icons are only used in MyTreeWidget or its child classes, so move this as well.
While doing so, make sure the PR_UNPAID, etc... constants are directly imported from paymentrequest.py and not transitively from some gui modules.

Test Plan

Run the application and check for no import error.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24314
Build 48238: Build Diff
Build 48237: arc lint + arc unit

Event Timeline

PiRK requested review of this revision.Jun 30 2023, 14:58
Fabien requested changes to this revision.Jun 30 2023, 15:24
Fabien added a subscriber: Fabien.
Fabien added inline comments.
electrum/electrumabc_gui/qt/tree_widget.py
1 ↗(On Diff #41124)

Time to start putting headers in here

This revision now requires changes to proceed.Jun 30 2023, 15:24

Run the application and check for no import error.

What's the best way to do this from the monorepo? The README walks me through how to run the unit tests (python3 test_runner.py) -- does ./electrum-abc just work from root?

Run the application and check for no import error.

What's the best way to do this from the monorepo? The README walks me through how to run the unit tests (python3 test_runner.py) -- does ./electrum-abc just work from root?

I'll review the documentation to clarify how to run from sources.
electrum/electrum-abc works if all dependencies are installed (pip install -r electrum/contrib/requirements.txt && pip install -r electrum/contrib/requirements-binaries.txt).

Additional dependencies can be installed for hardware wallets : requirements-hw.txt
And some additional libraries can be compiled for QR code support and fast cryptography (required for testing Cash Fusion): cd electrum && contrib/make_all

add a copyright header

This revision is now accepted and ready to land.Jul 3 2023, 06:58