From 43c49dd52767f23b826dfb8142c9353d101b7371 Mon Sep 17 00:00:00 2001 From: philip Date: Mon, 20 Dec 2021 11:07:41 +0300 Subject: [PATCH] Adds minor fixes: - Added appropriate imports: - from okota.token_index.index import to_identifier - from cic_eth.error import SignerError - cleaned up balance func. --- apps/cic-eth/cic_eth/eth/erc20.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/cic-eth/cic_eth/eth/erc20.py b/apps/cic-eth/cic_eth/eth/erc20.py index 62a5a0c3..a8922f27 100644 --- a/apps/cic-eth/cic_eth/eth/erc20.py +++ b/apps/cic-eth/cic_eth/eth/erc20.py @@ -22,7 +22,7 @@ from hexathon import ( from chainqueue.error import NotLocalTxError from eth_erc20 import ERC20 from chainqueue.sql.tx import cache_tx_dict -from okota.token_index import to_identifier +from okota.token_index.index import to_identifier # local imports from cic_eth.db.models.base import SessionBase @@ -46,13 +46,14 @@ from cic_eth.task import ( from cic_eth.eth.nonce import CustodialTaskNonceOracle from cic_eth.encode import tx_normalize from cic_eth.eth.trust import verify_proofs +from cic_eth.error import SignerError celery_app = celery.current_app logg = logging.getLogger() -@celery_app.task(base=CriticalWeb3Task) -def balance(tokens, holder_address, chain_spec_dict): +@celery_app.task(bind=True, base=CriticalWeb3Task) +def balance(self, tokens, holder_address, chain_spec_dict): """Return token balances for a list of tokens for given address :param tokens: Token addresses