@@ -229,11 +229,15 @@ def fetchkeys(account, perm, level=0, required_treshold=1):
229229 # Try obtain the private key from wallet
230230 wif = self .blockchain .wallet .getPrivateKeyForPublicKey (
231231 authority [0 ])
232- except Exception :
232+ except Exception as e :
233233 continue
234234
235235 if wif :
236236 r .append ([wif , authority [1 ]])
237+ # If we found a key for account, we add it
238+ # to signing_accounts to be sure we do not resign
239+ # another operation with the same account/wif
240+ self .signing_accounts .append (account )
237241
238242 # Test if we reached threshold already
239243 if sum ([x [1 ] for x in r ]) >= required_treshold :
@@ -267,13 +271,13 @@ def fetchkeys(account, perm, level=0, required_treshold=1):
267271 )
268272 # ... or should we rather obtain the keys from an account name
269273 else :
270- account = Account (account , blockchain_instance = self .blockchain )
271- required_treshold = account [permission ]["weight_threshold" ]
272- keys = fetchkeys (account , permission , required_treshold = required_treshold )
274+ accountObj = Account (account , blockchain_instance = self .blockchain )
275+ required_treshold = accountObj [permission ]["weight_threshold" ]
276+ keys = fetchkeys (accountObj , permission , required_treshold = required_treshold )
273277 # If we couldn't find an active key, let's try overwrite it
274278 # with an owner key
275279 if not keys and permission != "owner" :
276- keys .extend (fetchkeys (account , "owner" , required_treshold = required_treshold ))
280+ keys .extend (fetchkeys (accountObj , "owner" , required_treshold = required_treshold ))
277281 for x in keys :
278282 self .appendWif (x [0 ])
279283
0 commit comments