Skip to content

Commit

Permalink
Merge pull request #106 from KOSASIH/deepsource-transform-b2fe0635
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
KOSASIH authored May 10, 2024
2 parents 9d15cfd + 0ad693f commit 6e4226e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions blockchain/wallet.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 6e4226e

Please sign in to comment.