tcosigner pool: add warning when used with hardware wallet - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 95a93a3f86840bbbd8ee6e1388a8e673502c6d2b DIR parent 624fa4769d9f02fa71696b3d69030ae114ccf573 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 17 Apr 2018 16:20:08 +0200 cosigner pool: add warning when used with hardware wallet related: #4271 Diffstat: M plugins/cosigner_pool/qt.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) --- DIR diff --git a/plugins/cosigner_pool/qt.py b/plugins/cosigner_pool/qt.py t@@ -30,7 +30,7 @@ from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import QPushButton -from electrum import bitcoin, util +from electrum import bitcoin, util, keystore from electrum import transaction from electrum.plugins import BasePlugin, hook from electrum.i18n import _ t@@ -179,9 +179,10 @@ class Plugin(BasePlugin): server.put(_hash, message) except Exception as e: traceback.print_exc(file=sys.stdout) - window.show_message("Failed to send transaction to cosigning pool.") + window.show_message(_("Failed to send transaction to cosigning pool.")) return - window.show_message("Your transaction was sent to the cosigning pool.\nOpen your cosigner wallet to retrieve it.") + window.show_message(_("Your transaction was sent to the cosigning pool.") + '\n' + + _("Open your cosigner wallet to retrieve it.")) def on_receive(self, keyhash, message): self.print_error("signal arrived for", keyhash) t@@ -193,13 +194,20 @@ class Plugin(BasePlugin): return wallet = window.wallet - if wallet.has_keystore_encryption(): - password = window.password_dialog('An encrypted transaction was retrieved from cosigning pool.\nPlease enter your password to decrypt it.') + if isinstance(wallet.keystore, keystore.Hardware_KeyStore): + window.show_warning(_('An encrypted transaction was retrieved from cosigning pool.') + '\n' + + _('However, hardware wallets do not support message decryption, ' + 'which makes them not compatible with the current design of cosigner pool.')) + return + elif wallet.has_keystore_encryption(): + password = window.password_dialog(_('An encrypted transaction was retrieved from cosigning pool.') + '\n' + + _('Please enter your password to decrypt it.')) if not password: return else: password = None - if not window.question(_("An encrypted transaction was retrieved from cosigning pool.\nDo you want to open it now?")): + if not window.question(_("An encrypted transaction was retrieved from cosigning pool.") + '\n' + + _("Do you want to open it now?")): return xprv = wallet.keystore.get_master_private_key(password)