1
0

qt custom block explorer: fix handling non-str config values

fixes https://github.com/spesmilo/electrum/issues/7421

The config key can have non-str values (see line 367).
This commit is contained in:
SomberNight
2021-07-20 16:54:40 +02:00
parent d35a68d2d1
commit 173225ae92

View File

@@ -345,7 +345,7 @@ class SettingsDialog(WindowModalDialog):
msg = _('Choose which online block explorer to use for functions that open a web browser')
block_ex_label = HelpLabel(_('Online Block Explorer') + ':', msg)
block_ex_combo = QComboBox()
block_ex_custom_e = QLineEdit(self.config.get('block_explorer_custom') or '')
block_ex_custom_e = QLineEdit(str(self.config.get('block_explorer_custom') or ''))
block_ex_combo.addItems(block_explorers)
block_ex_combo.setCurrentIndex(
block_ex_combo.findText(util.block_explorer(self.config) or BLOCK_EX_CUSTOM_ITEM))