electrum

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

commit 8b194cd409a1a79e616578a5eaf91cba68b36dab
parent 322587e493bff16fce755541c3817a6e94ab6e7b
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 16 Aug 2017 12:40:12 +0200

show bip39 warning and add info about checksum disabled

Diffstat:
Mgui/qt/seed_dialog.py | 35+++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)

diff --git a/gui/qt/seed_dialog.py b/gui/qt/seed_dialog.py @@ -62,22 +62,21 @@ class SeedLayout(QVBoxLayout): vbox.addWidget(cb_ext) if 'bip39' in self.options: def f(b): + self.is_seed = (lambda x: bool(x)) if b else self.saved_is_seed + self.on_edit() if b: msg = ' '.join([ - '<b>' + _('Warning') + '</b>' + ': ', - _('BIP39 seeds may not be supported in the future.'), + '<b>' + _('Warning') + ': BIP39 seeds are dangerous!' + '</b><br/><br/>', + _('BIP39 seeds can be imported in Electrum so that users can access funds locked in other wallets.'), + _('However, BIP39 seeds do not include a version number, which compromises compatibility with future wallet software.'), '<br/><br/>', - _('As technology matures, Bitcoin address generation may change.'), - _('However, BIP39 seeds do not include a version number.'), - _('As a result, it is not possible to infer your wallet type from a BIP39 seed.'), - '<br/><br/>', - _('We do not guarantee that BIP39 seeds will be supported in future versions of Electrum.'), - _('We recommend to use seeds generated by Electrum or compatible wallets.'), + _('We do not guarantee that BIP39 imports will always be supported in Electrum.'), + _('In addition, Electrum does not verify the checksum of BIP39 seeds; make sure you type your seed correctly.'), ]) - #self.parent.show_warning(msg) - self.seed_type_label.setVisible(not b) - self.is_seed = (lambda x: bool(x)) if b else self.saved_is_seed - self.on_edit() + else: + msg = '' + self.seed_warning.setText(msg) + cb_bip39 = QCheckBox(_('BIP39 seed')) cb_bip39.toggled.connect(f) cb_bip39.setChecked(self.is_bip39) @@ -130,9 +129,10 @@ class SeedLayout(QVBoxLayout): hbox.addWidget(passphrase_e) self.addLayout(hbox) self.addStretch(1) + self.seed_warning = WWLabel('') + self.addWidget(self.seed_warning) if msg: - msg = seed_warning_msg(seed) - self.addWidget(WWLabel(msg)) + self.seed_warning.setText(seed_warning_msg(seed)) def get_seed(self): text = unicode(self.seed_e.text()) @@ -142,8 +142,11 @@ class SeedLayout(QVBoxLayout): from electrum.bitcoin import seed_type s = self.get_seed() b = self.is_seed(s) - t = seed_type(s) - label = _('Seed Type') + ': ' + t if t else '' + if not self.is_bip39: + t = seed_type(s) + label = _('Seed Type') + ': ' + t if t else '' + else: + label = 'BIP39 (checksum disabled)' self.seed_type_label.setText(label) self.parent.next_button.setEnabled(b)