Browse Source

fix plugin load_wallet hook

283
ThomasV 10 years ago
parent
commit
bf50bc45ef
  1. 2
      plugins/btchipwallet.py
  2. 2
      plugins/trustedcoin.py

2
plugins/btchipwallet.py

@ -74,6 +74,8 @@ class Plugin(BasePlugin):
@hook @hook
def load_wallet(self, wallet, window): def load_wallet(self, wallet, window):
self.wallet = wallet
self.window = window
if self.btchip_is_connected(): if self.btchip_is_connected():
if not self.wallet.check_proper_device(): if not self.wallet.check_proper_device():
QMessageBox.information(self.window, _('Error'), _("This wallet does not match your BTChip device"), _('OK')) QMessageBox.information(self.window, _('Error'), _("This wallet does not match your BTChip device"), _('OK'))

2
plugins/trustedcoin.py

@ -323,6 +323,8 @@ class Plugin(BasePlugin):
@hook @hook
def load_wallet(self, wallet, window): def load_wallet(self, wallet, window):
self.wallet = wallet
self.window = window
self.trustedcoin_button = StatusBarButton( QIcon(":icons/trustedcoin.png"), _("Network"), self.settings_dialog) self.trustedcoin_button = StatusBarButton( QIcon(":icons/trustedcoin.png"), _("Network"), self.settings_dialog)
self.window.statusBar().addPermanentWidget(self.trustedcoin_button) self.window.statusBar().addPermanentWidget(self.trustedcoin_button)
self.xpub = self.wallet.master_public_keys.get('x1/') self.xpub = self.wallet.master_public_keys.get('x1/')

Loading…
Cancel
Save