diff --git a/lib/commands.py b/lib/commands.py index 5e67f809..05e5628c 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -277,7 +277,6 @@ class Commands: return s.encode('utf8') def importprivkey(self, sec): - assert self.wallet.can_import() try: addr = self.wallet.import_key(sec,self.password) out = "Keypair imported: ", addr diff --git a/lib/wallet.py b/lib/wallet.py index 62494733..b5eff63b 100644 --- a/lib/wallet.py +++ b/lib/wallet.py @@ -288,6 +288,7 @@ class Abstract_Wallet(object): return account is not None def import_key(self, sec, password): + assert self.can_import() try: pubkey = public_key_from_private_key(sec) address = public_key_to_bc_address(pubkey.decode('hex'))