commit 4004b8085f6c9971c30a7981d791adc7ac8ea191
parent 1429c5b2bf682976aaf75818cb6785f9f7e71e22
Author: ThomasV <thomasv@electrum.org>
Date: Sat, 6 Jun 2020 13:34:40 +0200
kivy on_resume: check self.has_pin_code()
Diffstat:
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/electrum/gui/kivy/main_window.py b/electrum/gui/kivy/main_window.py
@@ -948,8 +948,12 @@ class ElectrumWindow(App):
def on_resume(self):
now = time.time()
- if self.wallet and self.wallet.has_password() and now - self.pause_time > 5*60:
- d = PincodeDialog(check_password=self.check_pin_code, on_success=None, on_failure=self.stop)
+ if self.wallet and self.has_pin_code() and now - self.pause_time > 5*60:
+ d = PincodeDialog(
+ self,
+ check_password=self.check_pin_code,
+ on_success=None,
+ on_failure=self.stop)
d.open()
if self.nfcscanner:
self.nfcscanner.nfc_enable()
@@ -1240,10 +1244,11 @@ class ElectrumWindow(App):
cb()
self.show_info(_("PIN updated") if new_password else _('PIN disabled'))
on_failure = lambda: self.show_error(_("PIN not updated"))
-
d = PincodeDialog(
- self, check_password=self.check_pin_code,
- on_success=on_success, on_failure=on_failure,
+ self,
+ check_password=self.check_pin_code,
+ on_success=on_success,
+ on_failure=on_failure,
is_change=True,
has_password = self.has_pin_code())
d.open()