From b10c7be005dda2aa9853ed25931cee1a1e174eb6 Mon Sep 17 00:00:00 2001 From: Karol Beker Date: Fri, 13 Jul 2018 08:28:09 +0200 Subject: [PATCH] fixup! Add implementation of TransactionsStorage using database --- concent_api/core/payments/storage.py | 36 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/concent_api/core/payments/storage.py b/concent_api/core/payments/storage.py index ab6f5a3b6..76a95bc34 100644 --- a/concent_api/core/payments/storage.py +++ b/concent_api/core/payments/storage.py @@ -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() ] @@ -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()