add check in importprivkey
This commit is contained in:
@@ -277,6 +277,7 @@ class Commands:
|
|||||||
return s.encode('utf8')
|
return s.encode('utf8')
|
||||||
|
|
||||||
def importprivkey(self, sec):
|
def importprivkey(self, sec):
|
||||||
|
assert self.wallet.can_import()
|
||||||
try:
|
try:
|
||||||
addr = self.wallet.import_key(sec,self.password)
|
addr = self.wallet.import_key(sec,self.password)
|
||||||
out = "Keypair imported: ", addr
|
out = "Keypair imported: ", addr
|
||||||
|
|||||||
Reference in New Issue
Block a user