mirror of https://github.com/nucypher/nucypher.git
Add __del__ to BlockchainPower
parent
91314b4524
commit
c2408eddce
|
@ -93,9 +93,15 @@ class BlockchainPower(CryptoPowerUp):
|
|||
if not self.is_unlocked:
|
||||
raise PowerUpError("Account is not unlocked.")
|
||||
|
||||
signature = Eth.sign(self.account, data=message)
|
||||
signature = self.blockchain.interface.call_backend_sign(self.account, message)
|
||||
return signature
|
||||
|
||||
def __del__(self):
|
||||
"""
|
||||
Deletes the blockchain power and locks the account.
|
||||
"""
|
||||
self.blockchain.interface.w3.personal.lockAccount(self.account)
|
||||
|
||||
|
||||
class KeyPairBasedPower(CryptoPowerUp):
|
||||
confers_public_key = True
|
||||
|
|
Loading…
Reference in New Issue