mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-01 17:55:20 +00:00
show_seed_dialog: return if user cancels p/w input
Update stale comment.
This commit is contained in:
parent
6b9d12e369
commit
c41e694534
1 changed files with 5 additions and 5 deletions
|
@ -1150,11 +1150,9 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
|
|
||||||
def protected(func):
|
def protected(func):
|
||||||
'''Password request wrapper. The password is passed to the function
|
'''Password request wrapper. The password is passed to the function
|
||||||
as the 'password' named argument. Return value is a 2-element
|
as the 'password' named argument. "None" indicates either an
|
||||||
tuple: (Cancelled, Result) where Cancelled is True if the user
|
unencrypted wallet, or the user cancelled the password request.
|
||||||
cancels the password request, otherwise False. Result is the
|
An empty input is passed as the empty string.'''
|
||||||
return value of the wrapped function, or None if cancelled.
|
|
||||||
'''
|
|
||||||
def request_password(self, *args, **kwargs):
|
def request_password(self, *args, **kwargs):
|
||||||
parent = self.top_level_window()
|
parent = self.top_level_window()
|
||||||
password = None
|
password = None
|
||||||
|
@ -2024,6 +2022,8 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
|
|
||||||
@protected
|
@protected
|
||||||
def show_seed_dialog(self, password):
|
def show_seed_dialog(self, password):
|
||||||
|
if self.wallet.use_encryption and password is None:
|
||||||
|
return # User cancelled password input
|
||||||
if not self.wallet.has_seed():
|
if not self.wallet.has_seed():
|
||||||
self.show_message(_('This wallet has no seed'))
|
self.show_message(_('This wallet has no seed'))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Add table
Reference in a new issue