electrum

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

commit 0e8976856d520e9c623c56d3d6bb3c6450370c08
parent 6f2396be34835716045818fd34a1468de0daf156
Author: ThomasV <thomasv@electrum.org>
Date:   Tue, 12 Jun 2018 10:49:16 +0200

Merge pull request #4429 from Anilkumar18/patch-2

Added a meaningful message on invalid public key
Diffstat:
Mgui/qt/main_window.py | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py @@ -2247,11 +2247,12 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): message = message.encode('utf-8') try: public_key = ecc.ECPubkey(bfh(pubkey_e.text())) - encrypted = public_key.encrypt_message(message) - encrypted_e.setText(encrypted.decode('ascii')) except BaseException as e: - traceback.print_exc(file=sys.stdout) - self.show_warning(str(e)) + traceback.print_exc(file=sys.stdout) + self.show_warning(_('Invalid Public key')) + return + encrypted = public_key.encrypt_message(message) + encrypted_e.setText(encrypted.decode('ascii')) def encrypt_message(self, address=''): d = WindowModalDialog(self, _('Encrypt/decrypt Message'))