electrum

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

commit 7d52cfd37447dbabd2b99615ffbd2f35389d4140
parent c9249281f324102997c475b490587233145b8a01
Author: racquemis <racquemis@users.noreply.github.com>
Date:   Sun, 14 Jan 2018 08:42:38 +0100

Handle invalid PIN on exporting private key

Prevent Android App from crashing when a wrong PIN is entered.
Diffstat:
Mgui/kivy/main_window.py | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py @@ -928,6 +928,10 @@ class ElectrumWindow(App): return if not self.wallet.can_export(): return - key = str(self.wallet.export_private_key(addr, password)[0]) - pk_label.data = key + try: + key = str(self.wallet.export_private_key(addr, password)[0]) + pk_label.data = key + except InvalidPassword: + self.show_error("Invalid PIN") + return self.protected(_("Enter your PIN code in order to decrypt your private key"), show_private_key, (addr, pk_label))