mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
cosign plugin: fix listener
This commit is contained in:
parent
31b6a4b4d0
commit
ee067a47dd
1 changed files with 3 additions and 5 deletions
|
@ -93,14 +93,9 @@ class Plugin(BasePlugin):
|
||||||
def init_qt(self, gui):
|
def init_qt(self, gui):
|
||||||
self.win = gui.main_window
|
self.win = gui.main_window
|
||||||
self.win.connect(self.win, SIGNAL('cosigner:receive'), self.on_receive)
|
self.win.connect(self.win, SIGNAL('cosigner:receive'), self.on_receive)
|
||||||
if self.listener is None:
|
|
||||||
self.listener = Listener(self)
|
|
||||||
self.listener.start()
|
|
||||||
|
|
||||||
def enable(self):
|
def enable(self):
|
||||||
self.set_enabled(True)
|
self.set_enabled(True)
|
||||||
if self.win.wallet:
|
|
||||||
self.load_wallet(self.win.wallet)
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def is_available(self):
|
def is_available(self):
|
||||||
|
@ -110,6 +105,9 @@ class Plugin(BasePlugin):
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
def load_wallet(self, wallet):
|
def load_wallet(self, wallet):
|
||||||
|
if self.listener is None:
|
||||||
|
self.listener = Listener(self)
|
||||||
|
self.listener.start()
|
||||||
self.wallet = wallet
|
self.wallet = wallet
|
||||||
if not self.is_available():
|
if not self.is_available():
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue