예제 #1
0
    def seed_input_bip39(self, title, message, is_seed):
        slayout = SeedInputLayout(self, message, is_seed)
        vbox = QVBoxLayout()
        vbox.addLayout(slayout.layout())
        if self.opt_ext or self.opt_bip39:
            vbox.addStretch(1)
            # vbox.addWidget(QLabel(_('Options') + ':'))
        if self.opt_ext:
            cb_pass = QCheckBox(_('Add a passphrase to this seed'))
            # vbox.addWidget(cb_pass)
        if self.opt_bip39:
            def f(b):
                if b:
                    msg = ' '.join([
                        '<b>' + _('Warning') + '</b>' + ': ',
                        _('BIP39 seeds may not be supported in the future.'),
                        '<br/><br/>',
                        _('As technology matures, Ulord 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 UWalletLite.'),
                        _('We recommend to use seeds generated by UWalletLite or compatible wallets.'),
                    ])
                    # self.show_warning(msg)
                slayout.seed_type_label.setVisible(not b)
                slayout.is_seed = (lambda x: bool(x)) if b else is_seed
                slayout.on_edit()

            cb_bip39 = QCheckBox(_('BIP39 seed'))
            cb_bip39.toggled.connect(f)
            f(True)
            # vbox.addWidget(cb_bip39)
        self.set_main_layout(vbox, title, next_enabled=False)
        seed = slayout.get_seed()
예제 #2
0
 def seed_input(self, title, message, is_seed):
     slayout = SeedInputLayout(self, message, is_seed)
     vbox = QVBoxLayout()
     vbox.addLayout(slayout.layout())
     if self.opt_bip39:
         vbox.addStretch(1)
         vbox.addWidget(QLabel(_('Options') + ':'))
         def f(b):
             slayout.is_seed = (lambda x: bool(x)) if b else is_valid
             slayout.on_edit()
         cb_bip39 = QCheckBox(_('BIP39/BIP44 seed'))
         cb_bip39.toggled.connect(f)
         vbox.addWidget(cb_bip39)
     self.set_main_layout(vbox, title, next_enabled=False)
     seed = slayout.get_seed()
     is_bip39 = cb_bip39.isChecked() if self.opt_bip39 else False
     return seed, is_bip39