From 6670d6e200020c0edc8b9c71218c09557262edda Mon Sep 17 00:00:00 2001 From: PiRK Date: Fri, 20 Jan 2023 15:24:15 +0100 Subject: [PATCH] Fix the Optional Features menu This is a backport of https://github.com/Bitcoin-ABC/ElectrumABC/commit/ff1a10173352b0a77f4cf14fa04cfd51d308b687 After commit 1fa9c815d45debe433ced590dcd03e72b99414e4, `descr["__name__"]` no longer matches the short name key expected by `plugins.get_internal_plugin(name)`. As a result, all plugins in that menu dialog were greyed out, and the user could no longer disable or enable a plugin. For existing users, everything stayed the same (previously enabled plugins stayed enabled and vice-versa), so the damage is mainly limited to new users not being able to enable CashFusion. --- electroncash_gui/qt/main_window.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/electroncash_gui/qt/main_window.py b/electroncash_gui/qt/main_window.py index 93bacba7ce00..8cb2c0609e64 100644 --- a/electroncash_gui/qt/main_window.py +++ b/electroncash_gui/qt/main_window.py @@ -5152,7 +5152,9 @@ def do_toggle(weakCb, name, i): run_hook('init_qt', gui_object) for i, descr in enumerate(plugins.internal_plugin_metadata.values()): - name = descr['__name__'] + # descr["__name__"] is the fully qualified package name + # (electroncash_plugins.name) + name = descr["__name__"].split(".")[-1] p = plugins.get_internal_plugin(name) if descr.get('registers_keystore'): continue