From 1acfff9f4675b617d56b1e73cb91564437b49bfd Mon Sep 17 00:00:00 2001 From: PhilipWafula Date: Wed, 6 Oct 2021 08:52:23 +0300 Subject: [PATCH] Minor refactors on address check. --- apps/cic-eth/cic_eth/eth/nonce.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/cic-eth/cic_eth/eth/nonce.py b/apps/cic-eth/cic_eth/eth/nonce.py index 412e18ee..cfc49bba 100644 --- a/apps/cic-eth/cic_eth/eth/nonce.py +++ b/apps/cic-eth/cic_eth/eth/nonce.py @@ -3,7 +3,7 @@ import logging # external imports import celery -from chainlib.eth.address import is_checksum_address +from chainlib.eth.address import is_checksum_address, is_address # local imports from cic_eth.db.models.role import AccountRole @@ -65,7 +65,7 @@ def reserve_nonce(self, chained_input, chain_spec_dict, signer_address=None): address = AccountRole.get_address(signer_address, session=session) logg.debug('role for reserve nonce {} -> {}'.format(signer_address, address)) - if not is_checksum_address(address): + if not is_address(address): raise ValueError('invalid result when resolving address for nonce {}'.format(address)) root_id = self.request.root_id