GenSpark AI Developer 89126ef1c7 fix(gui): restore BAL status-bar icon (bottom-right) + open settings on click
Regression: create_status_bar had been turned into a no-op while chasing the
"condensed menu/tabs" bug. The real cause of that bug was a Windows
OverflowError (year 2038), already fixed separately -- so the no-op wrongly
removed the BAL icon from the status bar.

Restore the original (Gitea) behaviour:
- Build a StatusBarButton with the bal32x32 icon and add it via
  addPermanentWidget, so the icon shows the plugin is installed.
- Clicking the icon opens settings_dialog (quick access to plugin settings).
- Track buttons in self._statusbar_buttons keyed by id(sb.window()); remove the
  stale button before creating a new one to avoid a duplicated icon on restart
  / wallet switch.

Also:
- import StatusBarButton from electrum.gui.qt.main_window; ensure
  read_QIcon_from_bytes is imported; init self._statusbar_buttons in __init__.
- Update tests/gui_fixes_test.py: the regression check now asserts the icon IS
  added (StatusBarButton + addPermanentWidget + settings_dialog +
  _statusbar_buttons book-keeping), instead of the previous wrong no-op check.

Tests: 182 official tests pass; smoke/windows_overflow/parallel/external_zip OK.
Note: from now on all code and code-comments are in English.
2026-06-15 14:46:53 +00:00

BAL — Bitcoin After Life (Electrum plugin)

Free and decentralized Bitcoin inheritance support for the Electrum wallet. Build time-locked "will" transactions that transfer your funds to your heirs if you stop refreshing them (dead-man's switch), optionally relayed by will-executor servers.

This repository contains a behavior-preserving refactor of the original plugin. The logic was kept byte-identical wherever possible; only the file layout was reorganized to cleanly separate business logic from the PyQt GUI.

Repository layout

bal/                     the installable Electrum plugin package
├── manifest.json        plugin metadata (Electrum reads this)
├── qt.py                Qt entry-point shim (re-exports Plugin)
├── core/                GUI-free logic (importable without Qt)
│   ├── util.py
│   ├── plugin_base.py
│   ├── heirs.py
│   ├── will.py
│   └── willexecutors.py
├── gui/qt/              PyQt6 presentation layer
│   ├── theme.py         status → color mapping
│   ├── common.py        shared imports / helpers
│   ├── widgets.py       leaf widgets
│   ├── calendar.py      calendar widget
│   ├── dialogs.py       dialog windows
│   ├── lists.py         tree/list views
│   ├── window.py        per-wallet GUI controller
│   └── plugin.py        Plugin (Electrum @hooks → GUI)
├── icons/  wallet_util/  LICENSE  VERSION  README.md
build_zip.py             builds a clean, zipimport-friendly distribution zip
tests/                   smoke + external-zip regression tests

Requirements

  • Electrum 4.7.2 — the last stable release exposing json_db.register_dict, which this plugin relies on. Newer versions removed it.
  • PyQt6 (bundled with the Electrum desktop GUI).

Installation

Build the distribution archive

python3 build_zip.py
# -> bal-electrum-plugin.zip  (prints size + SHA-256 for integrity checks)

The builder writes a zipimport-friendly archive (files only, standard DEFLATE, deterministic order) to avoid loader errors seen on some Electrum portable builds.

Install as an external plugin (zip)

  1. Electrum → Tools → Plugins → install from file → pick the built zip.
  2. Enable Bitcoin After Life and restart Electrum.
  3. (Recommended) verify the downloaded zip's SHA-256 matches the value printed by build_zip.py.

Install as an internal plugin

Copy the bal/ directory into your Electrum installation's electrum/plugins/ directory, so that electrum/plugins/bal/manifest.json exists, then enable it from Tools → Plugins.

Testing

# imports + behavior
QT_QPA_PLATFORM=offscreen PYTHONPATH=<electrum-src> \
    python3 tests/smoke_test.py electrum.plugins.bal

# external-zip loading regression
QT_QPA_PLATFORM=offscreen PYTHONPATH=<electrum-src> \
    python3 tests/external_zip_test.py bal-electrum-plugin.zip

⚠️ Safety

This plugin builds real Bitcoin inheritance transactions with time-locks. Test on testnet or a fund-less wallet first, and review the generated transactions before broadcasting.

License

MIT — see bal/LICENSE.

Description
Plugin Bitcoin After Life for Electrum Bitcoin Wallet
Readme 6.9 MiB
Languages
Python 100%