kivy: fix watching-only issue
This commit is contained in:
parent
247722fdec
commit
94664566e7
|
@ -106,13 +106,11 @@ class InstallWizard(Widget):
|
|||
self.run('add_seed', (text, None))
|
||||
|
||||
msg = _('To create a watching-only wallet, paste your master public key, or scan it using the camera button.')
|
||||
RestoreXpubDialog(test=Wallet.is_xpub, message=msg, on_release=on_xpub).open()
|
||||
RestoreXpubDialog(test=Wallet.is_mpk, message=msg, on_release=on_xpub).open()
|
||||
|
||||
def add_seed(self, text, password):
|
||||
def task():
|
||||
if not Wallet.is_seed(text):
|
||||
raise BaseException("invalid seed")
|
||||
self.wallet = Wallet.from_seed(text, password, self.storage)
|
||||
self.wallet = Wallet.from_text(text, password, self.storage)
|
||||
self.wallet.create_main_account()
|
||||
self.wallet.synchronize()
|
||||
msg= _("Electrum is generating your addresses, please wait.")
|
||||
|
|
|
@ -1987,6 +1987,10 @@ class Wallet(object):
|
|||
def is_seed(seed):
|
||||
return is_old_seed(seed) or is_new_seed(seed)
|
||||
|
||||
@staticmethod
|
||||
def is_mpk(text):
|
||||
return Wallet.is_old_mpk(text) or Wallet.is_xpub(text)
|
||||
|
||||
@staticmethod
|
||||
def is_old_mpk(mpk):
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue