Skip to content

Commit

Permalink
fixup! Add implementation of TransactionsStorage using database
Browse files Browse the repository at this point in the history
  • Loading branch information
kbeker committed Jul 13, 2018
1 parent fa739c0 commit b10c7be
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions concent_api/core/payments/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ def get_all_tx(self) -> List[Transaction]:
"""
return [
Transaction(
nonce = ethereum_transaction.get_nonce,
gasprice = ethereum_transaction.get_gasprice,
startgas = ethereum_transaction.get_startgas,
value = ethereum_transaction.value,
v = ethereum_transaction.v,
r = ethereum_transaction.get_r,
s = ethereum_transaction.get_s,
data = ethereum_transaction.data.tobytes(),
to = HexBytes(ethereum_transaction.to.tobytes()).hex(),
nonce=ethereum_transaction.get_nonce,
gasprice=ethereum_transaction.get_gasprice,
startgas=ethereum_transaction.get_startgas,
value=ethereum_transaction.value,
v=ethereum_transaction.v,
r=ethereum_transaction.get_r,
s=ethereum_transaction.get_s,
data=ethereum_transaction.data.tobytes(),
to=HexBytes(ethereum_transaction.to.tobytes()).hex(),
)
for ethereum_transaction in PendingEthereumTransaction.objects.all()
]
Expand All @@ -78,15 +78,15 @@ def put_tx_and_inc_nonce(self, tx: Transaction) -> None:
)

pending_ethereum_transaction = PendingEthereumTransaction(
nonce = tx.nonce,
gasprice = tx.gasprice,
startgas = tx.startgas,
value = tx.value,
v = tx.v,
r = tx.r,
s = tx.s,
data = tx.data,
to = tx.to,
nonce=tx.nonce,
gasprice=tx.gasprice,
startgas=tx.startgas,
value=tx.value,
v=tx.v,
r=tx.r,
s=tx.s,
data=tx.data,
to=tx.to,
)
pending_ethereum_transaction.full_clean()
pending_ethereum_transaction.save()
Expand Down

0 comments on commit b10c7be

Please sign in to comment.