1
0

qt receive tab: show address on hw wallet

This commit is contained in:
SomberNight
2018-04-27 03:21:27 +02:00
parent 376a815458
commit 688dd07381
8 changed files with 71 additions and 9 deletions

View File

@@ -201,6 +201,7 @@ class QtPluginBase(object):
handler.button = button
keystore.handler = handler
keystore.thread = TaskThread(window, window.on_error)
self.add_show_address_on_hw_device_button_for_receive_addr(wallet, keystore, window)
# Trigger a pairing
keystore.thread.add(partial(self.get_client, keystore))
@@ -218,3 +219,13 @@ class QtPluginBase(object):
def show_settings_dialog(self, window, keystore):
device_id = self.choose_device(window, keystore)
def add_show_address_on_hw_device_button_for_receive_addr(self, wallet, keystore, main_window):
plugin = keystore.plugin
receive_address_e = main_window.receive_address_e
def show_address():
addr = receive_address_e.text()
keystore.thread.add(partial(plugin.show_address, wallet, addr, keystore))
# TODO icon
receive_address_e.addButton(":icons/tab_console.png", show_address, _("Show on {}").format(plugin.device))