forked from bitcoinafterlife/bal-electrum-plugin
UI polish and signed-tx colour fix (v0.3.3)
Fix and refine the BAL plugin GUI without changing business logic: core/will.py: restore the PUSHED requirement in needs_server_check so a signed-but-not-broadcast will is no longer server-queried and therefore stays blue (COMPLETE) instead of turning red (CHECK_FAIL). This matches the original Gitea check() condition. gui/qt/widgets.py: WillSettingsWidget vertical layout now caps every row to the widest date-row width and left-aligns them; the leading icons keep their original HelpButton width. gui/qt/lists.py + gui/qt/common.py: the wizard toolbar button now shows a 28x28 icon plus a bold 'Create your will' caption (QSize imported). gui/qt/dialogs.py (BalBuildWillDialog): - closing summary row labelled 'All done: Ok' with a blank separator above it; - 'checking variables' capitalised to 'Checking variables' (redundant trailing colon dropped); - final auto-closing countdown replaced by an explicit right-aligned 'Close' button; intermediate technical pauses kept; next-steps popup preserved. gui/qt/window.py + core/plugin_base.py: guide show_message on build, and sync_hide_filters() in update_all so hide flags refresh immediately. tests: test_needs_server_check updated; added offscreen preview helpers. Version bumped to 0.3.3. 186 tests pass; ruff clean (baseline only).
This commit is contained in:
committed by
steal
parent
365824767b
commit
30bab62247
@@ -227,17 +227,22 @@ def test_check_heir_added_triggers_rebuild():
|
||||
|
||||
|
||||
def test_needs_server_check():
|
||||
"""Check button selection logic: a VALID will with a will-executor that is
|
||||
not yet CHECKED must be queried on the server, even if it is not PUSHED
|
||||
(regression for the 'New / Not sent' wills that Check ignored)."""
|
||||
"""Check button selection logic: only a VALID, PUSHED will with a
|
||||
will-executor that is not yet CHECKED must be queried on the server.
|
||||
|
||||
A will that was never sent (not PUSHED) must NOT be queried: the server
|
||||
would correctly answer "I don't have it", which would be recorded as
|
||||
CHECK_FAIL and turn a merely signed-but-not-sent will red instead of leaving
|
||||
it blue (#2bc8ed). This matches the original BAL ``check()`` behaviour."""
|
||||
we = {"url": "https://we.example.com"}
|
||||
|
||||
# New (not PUSHED) but has a will-executor -> must be checked.
|
||||
# New (not PUSHED) but has a will-executor -> must NOT be checked, otherwise
|
||||
# a signed-but-not-sent will would falsely turn CHECK_FAIL (red).
|
||||
item_new = _make_willitem_blank()
|
||||
item_new.we = we
|
||||
assert Will.needs_server_check(item_new) is True
|
||||
assert Will.needs_server_check(item_new) is False
|
||||
|
||||
# PUSHED but not CHECKED -> must be checked (previous behaviour).
|
||||
# PUSHED but not CHECKED -> must be checked.
|
||||
item_pushed = _make_willitem_blank()
|
||||
item_pushed.we = we
|
||||
item_pushed.set_status("PUSHED", True)
|
||||
|
||||
Reference in New Issue
Block a user