diff --git a/blockchain/wallet.py b/blockchain/wallet.py index 0435c425d..b23d52db9 100644 --- a/blockchain/wallet.py +++ b/blockchain/wallet.py @@ -1,13 +1,14 @@ import hashlib import time + class Wallet: def __init__(self): - self.private_key = hashlib.sha256(str(time.time()).encode('utf-8')).hexdigest() - self.public_key = hashlib.sha256(self.private_key.encode('utf-8')).hexdigest() + self.private_key = hashlib.sha256(str(time.time()).encode("utf-8")).hexdigest() + self.public_key = hashlib.sha256(self.private_key.encode("utf-8")).hexdigest() def generate_address(self): - return hashlib.sha256(self.public_key.encode('utf-8')).hexdigest() + return hashlib.sha256(self.public_key.encode("utf-8")).hexdigest() def send_transaction(self, recipient, amount): transaction = Transaction(self.generate_address(), recipient, amount)