payserver: fix #8299
This commit is contained in:
@@ -70,7 +70,6 @@ class PayServerPlugin(BasePlugin):
|
||||
if view_url := self.view_url(key):
|
||||
d['view_url'] = view_url
|
||||
|
||||
|
||||
class PayServer(Logger, EventListener):
|
||||
|
||||
WWW_DIR = os.path.join(os.path.dirname(__file__), 'www')
|
||||
|
||||
@@ -33,6 +33,18 @@ from .payserver import PayServerPlugin
|
||||
|
||||
class Plugin(PayServerPlugin):
|
||||
|
||||
_init_qt_received = False
|
||||
|
||||
@hook
|
||||
def init_qt(self, gui: 'ElectrumGui'):
|
||||
if self._init_qt_received: # only need/want the first signal
|
||||
return
|
||||
self._init_qt_received = True
|
||||
# If the user just enabled the plugin, the 'load_wallet' hook would not
|
||||
# get called for already loaded wallets, hence we call it manually for those:
|
||||
for window in gui.windows:
|
||||
self.daemon_wallet_loaded(gui.daemon, window.wallet)
|
||||
|
||||
def requires_settings(self):
|
||||
return True
|
||||
|
||||
@@ -68,6 +80,8 @@ class Plugin(PayServerPlugin):
|
||||
self.config.set_key('payserver_address', str(address_e.text()))
|
||||
self.config.set_key('ssl_keyfile', str(keyfile_e.text()))
|
||||
self.config.set_key('ssl_certfile', str(certfile_e.text()))
|
||||
# fixme: restart the server
|
||||
window.show_message('Please restart Electrum to enable those changes')
|
||||
|
||||
@hook
|
||||
def receive_list_menu(self, parent, menu, key):
|
||||
|
||||
Reference in New Issue
Block a user