Remove more duplicated code
This commit is contained in:
parent
d843e41884
commit
7811b974e9
|
@ -125,6 +125,7 @@ class QtPlugin(TrezorPlugin):
|
||||||
def installwizard_load_wallet(self, wallet, window):
|
def installwizard_load_wallet(self, wallet, window):
|
||||||
if type(wallet) != self.wallet_class:
|
if type(wallet) != self.wallet_class:
|
||||||
return
|
return
|
||||||
|
wallet.plugin = self
|
||||||
self.load_wallet(wallet, window)
|
self.load_wallet(wallet, window)
|
||||||
|
|
||||||
@hook
|
@hook
|
||||||
|
@ -159,20 +160,6 @@ class QtPlugin(TrezorPlugin):
|
||||||
menu.addAction(_("Show on %s") % self.device,
|
menu.addAction(_("Show on %s") % self.device,
|
||||||
lambda: self.show_address(addrs[0]))
|
lambda: self.show_address(addrs[0]))
|
||||||
|
|
||||||
def show_address(self, address):
|
|
||||||
self.wallet.check_proper_device()
|
|
||||||
try:
|
|
||||||
address_path = self.wallet.address_id(address)
|
|
||||||
address_n = self.get_client().expand_path(address_path)
|
|
||||||
except Exception, e:
|
|
||||||
self.give_error(e)
|
|
||||||
try:
|
|
||||||
self.get_client().get_address('Bitcoin', address_n, True)
|
|
||||||
except Exception, e:
|
|
||||||
self.give_error(e)
|
|
||||||
finally:
|
|
||||||
self.handler.stop()
|
|
||||||
|
|
||||||
def settings_dialog(self, window):
|
def settings_dialog(self, window):
|
||||||
|
|
||||||
def rename():
|
def rename():
|
||||||
|
|
Loading…
Reference in New Issue