From 5b2068976c0e0378c3986c1eabcb940b89a9f32d Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 7 Feb 2025 16:22:44 +0000 Subject: [PATCH] config: remove a footgun --- electrum/simple_config.py | 2 ++ run_electrum | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/electrum/simple_config.py b/electrum/simple_config.py index c8c537071..eac34cc73 100644 --- a/electrum/simple_config.py +++ b/electrum/simple_config.py @@ -186,6 +186,8 @@ class SimpleConfig(Logger): read_user_dir_function=None): if options is None: options = {} + for config_key in options: + assert isinstance(config_key, str), f"{config_key=!r} has type={type(config_key)}, expected str" Logger.__init__(self) diff --git a/run_electrum b/run_electrum index 5b19a53d5..8683112c1 100755 --- a/run_electrum +++ b/run_electrum @@ -326,7 +326,7 @@ def main(): 'cmd': 'gui', SimpleConfig.GUI_NAME.key(): 'qml', SimpleConfig.WALLET_USE_SINGLE_PASSWORD.key(): True, - SimpleConfig.SWAPSERVER_URL: 'https://swaps.electrum.org/api', + SimpleConfig.SWAPSERVER_URL.key(): 'https://swaps.electrum.org/api', } if util.get_android_package_name() == "org.electrum.testnet.electrum": # ~hack for easier testnet builds. pkgname subject to change.