Browse Source

add warning that seed extension will not be included in the backup (#4555)

3.2.x
tiagotrs 7 years ago
committed by ghost43
parent
commit
b4b862b0cc
  1. 3
      electrum/gui/qt/seed_dialog.py
  2. 10
      electrum/plugins/revealer/qt.py

3
electrum/gui/qt/seed_dialog.py

@ -207,5 +207,6 @@ class SeedDialog(WindowModalDialog):
title = _("Your wallet generation seed is:")
slayout = SeedLayout(title=title, seed=seed, msg=True, passphrase=passphrase)
vbox.addLayout(slayout)
run_hook('set_seed', seed, slayout.seed_e)
has_extension = True if passphrase else False
run_hook('set_seed', seed, has_extension, slayout.seed_e)
vbox.addLayout(Buttons(CloseButton(self)))

10
electrum/plugins/revealer/qt.py

@ -57,8 +57,9 @@ class Plugin(BasePlugin):
make_dir(self.base_dir)
@hook
def set_seed(self, seed, parent):
def set_seed(self, seed, has_extension, parent):
self.cseed = seed.upper()
self.has_extension = has_extension
parent.addButton(':icons/revealer.png', partial(self.setup_dialog, parent), "Revealer"+_(" secret backup utility"))
def requires_settings(self):
@ -168,6 +169,10 @@ class Plugin(BasePlugin):
"<br/>","<b>", self.base_dir+ self.filename+self.version+"_"+self.code_id,"</b>"]))
dialog.close()
def ext_warning(self, dialog):
dialog.show_message(''.join(["<b>",_("Warning: "), "</b>", _("your seed extension will not be included in the encrypted backup.")]))
dialog.close()
def bdone(self, dialog):
dialog.show_message(''.join([_("Digital Revealer ({}_{}) saved as PNG and PDF at:").format(self.version, self.code_id),
"<br/>","<b>", self.base_dir + 'revealer_' +self.version + '_'+ self.code_id, '</b>']))
@ -360,6 +365,9 @@ class Plugin(BasePlugin):
self.filename = self.wallet_name+'_'+ _('seed')+'_'
self.was = self.wallet_name +' ' + _('seed')
if self.has_extension:
self.ext_warning(self.c_dialog)
if not calibration:
self.toPdf(QImage(cypherseed))
QDesktopServices.openUrl (QUrl.fromLocalFile(os.path.abspath(self.base_dir+self.filename+self.version+'_'+self.code_id+'.pdf')))

Loading…
Cancel
Save