diff --git a/lib/plugins.py b/lib/plugins.py index 2a6a3b2b6..311dea7aa 100644 --- a/lib/plugins.py +++ b/lib/plugins.py @@ -40,12 +40,13 @@ def hook(func): def run_hook(name, *args): + SPECIAL_HOOKS = ['add_wallet_types', 'get_wizard_action'] results = [] f_list = hooks.get(name,[]) for p, f in f_list: if name == 'load_wallet': p.wallet = args[0] - if p.is_enabled(): + if name in SPECIAL_HOOKS or p.is_enabled(): try: r = f(*args) except Exception: diff --git a/plugins/trustedcoin.py b/plugins/trustedcoin.py index 5fd7764c0..b78846ccc 100644 --- a/plugins/trustedcoin.py +++ b/plugins/trustedcoin.py @@ -344,15 +344,13 @@ class Plugin(BasePlugin): @hook def load_wallet(self, wallet): - self.wallet = wallet - if self.is_enabled(): - self.trustedcoin_button = StatusBarButton( QIcon(":icons/trustedcoin.png"), _("Network"), self.settings_dialog) - self.window.statusBar().addPermanentWidget(self.trustedcoin_button) - self.xpub = self.wallet.master_public_keys.get('x1/') - self.user_id = self.get_user_id()[1] - t = threading.Thread(target=self.request_billing_info) - t.setDaemon(True) - t.start() + self.trustedcoin_button = StatusBarButton( QIcon(":icons/trustedcoin.png"), _("Network"), self.settings_dialog) + self.window.statusBar().addPermanentWidget(self.trustedcoin_button) + self.xpub = self.wallet.master_public_keys.get('x1/') + self.user_id = self.get_user_id()[1] + t = threading.Thread(target=self.request_billing_info) + t.setDaemon(True) + t.start() @hook def close_wallet(self):