forked from bitcoinafterlife/bal-electrum-plugin
feat(bal): UI batch v0.3.9 + expired-will invalidate regression fix
UI batch (TASK A/B/C/D): - (A) Clearer 'Will expired' message: shortened will id (8+8 chars) and readable UTC date instead of raw UNIX timestamp; shown in WARNING colour (orange) instead of ERROR (red) in the wizard, as it is an expected step. - (A2) Split the orange message onto two lines via <br> (rendered as HTML by msg_warning) to avoid an overly long single line. - (B) History tab labels (text only): inheritance txs -> 'BAL Inheritance transaction'; invalidate tx -> 'BAL Invalidate transaction'. Colours left to Electrum defaults. - (C) New 'No will-executor TX' checkbox in plugin settings, bound to the existing NO_WILLEXECUTOR config (default ON, kept in sync with the wizard), with help text, and included in the settings reset action. - (D) Wizard button label 'Create your will' -> 'Build Your Will'. Regression fix (A3): - When an heir was added to an already-expired will via the wizard, the automatic invalidation no longer triggered. Root cause: the inner check_will() after build_will() raised WillExpiredException and the handler returned (False, None), which never invalidated. - Auto-opening the invalidation tx window from the closing wizard proved unreliable (the window ended up behind the main wallet on some window managers; a re-check loop could ask to invalidate repeatedly before the tx reached the mempool). The robust fix: close the wizard and show a clear instruction popup guiding the user to run 'Tools -> Invalidate' and then press 'Check' to finish the will. Reasoning documented in the code. Version bumped to 0.3.9 (manifest.json, __init__.py, plugin_base.py, VERSION). CHANGELOG entry #15 updated. Verified: py_compile OK, ruff clean (no new errors), full test suite 239 passed.
This commit is contained in:
@@ -608,7 +608,8 @@ class BalWindow:
|
||||
try:
|
||||
self.check_will()
|
||||
for wid, _w in self.willitems.items():
|
||||
self.wallet.set_label(wid, "BAL Transaction")
|
||||
# Label shown in Electrum's History tab for inheritance txs.
|
||||
self.wallet.set_label(wid, "BAL Inheritance transaction")
|
||||
rebuilt_ok = True
|
||||
except WillExpiredException as e:
|
||||
self.invalidate_will()
|
||||
@@ -699,7 +700,8 @@ class BalWindow:
|
||||
"Please sign and broadcast this transaction to invalidate current will"
|
||||
)
|
||||
)
|
||||
self.wallet.set_label(result.txid(), "BAL Invalidate")
|
||||
# Label shown in Electrum's History tab for invalidate txs.
|
||||
self.wallet.set_label(result.txid(), "BAL Invalidate transaction")
|
||||
self.show_transaction(result)
|
||||
else:
|
||||
self.show_message(_("No transactions to invalidate"))
|
||||
|
||||
Reference in New Issue
Block a user