示例#1
0
 def derivation_dialog_145(self, f):
     default = bip44_derivation_145(0)
     message = '\n'.join([
         _('Enter your wallet derivation here.'),
         _('If you are not sure what this is, leave this field unchanged.')
     ])
     self.line_dialog(run_next=f,
                      title=_('Derivation'),
                      message=message,
                      default=default,
                      test=bitcoin.is_bip32_derivation)
示例#2
0
 def derivation_dialog_145(self, f):
     default = bip44_derivation_145(0)
     message = '\n'.join([
         _('Enter your wallet derivation here.'),
         _('If you are not sure what this is, leave this field unchanged.'),
         _("If you want the wallet to use legacy Bitcoin addresses use m/44'/0'/0'"
           ),
         _("If you want the wallet to use Bitcoin Cash adresses use m/44'/145'/0'"
           )
     ])
     self.line_dialog(run_next=f,
                      title=_('Derivation'),
                      message=message,
                      default=default,
                      test=bitcoin.is_bip32_derivation)
示例#3
0
 def on_device(self, name, device_info):
     self.plugin = self.plugins.get_plugin(name)
     try:
         self.plugin.setup_device(device_info, self)
     except BaseException as e:
         self.show_error(str(e))
         self.choose_hw_device()
         return
     f = lambda x: self.run('on_hw_derivation', name, device_info, str(x))
     if self.wallet_type == 'multisig':
         # There is no general standard for HD multisig.
         # This is partially compatible with BIP45; assumes index=0
         default_derivation = "m/45'/0"
     else:
         default_derivation = bip44_derivation_145(0)
     self.derivation_dialog_other(f, default_derivation)
示例#4
0
 def on_restore_bip39_145(self, seed, passphrase):
     f = lambda x: self.run('on_bip44', seed, passphrase, str(x))
     self.derivation_dialog_other(f, bip44_derivation_145(0))