Skip to content

Commit

Permalink
Fix getActiveKeyForAccount failing when multiple keys installed
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroc committed Nov 12, 2018
1 parent 3aa81cc commit 8d66b43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bitshares/wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,10 @@ def getActiveKeyForAccount(self, name):
"""
account = self.rpc.get_account(name)
for authority in account["active"]["key_auths"]:
key = self.getPrivateKeyForPublicKey(authority[0])
if key:
return key
try:
return self.getPrivateKeyForPublicKey(authority[0])
except:
pass
return False

def getAccountFromPrivateKey(self, wif):
Expand Down

0 comments on commit 8d66b43

Please sign in to comment.