electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d56dba80392bd5e7d679ab9483b2cbfd50d4c506
parent 5095687d634cb512b88ffa4be94516e0b45cd689
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue,  6 Feb 2018 19:10:56 +0100

watch-only wallets can't sign or decrypt messages

Diffstat:
Mgui/qt/main_window.py | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -2119,6 +2119,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): if not bitcoin.is_address(address): self.show_message(_('Invalid Bitcoin address.')) return + if self.wallet.is_watching_only(): + self.show_message(_('This is a watching-only wallet.')) + return if not self.wallet.is_mine(address): self.show_message(_('Address not in wallet.')) return @@ -2189,6 +2192,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): @protected def do_decrypt(self, message_e, pubkey_e, encrypted_e, password): + if self.wallet.is_watching_only(): + self.show_message(_('This is a watching-only wallet.')) + return cyphertext = encrypted_e.toPlainText() task = partial(self.wallet.decrypt_message, pubkey_e.text(), cyphertext, password) self.wallet.thread.add(task, on_success=lambda text: message_e.setText(text.decode('utf-8')))