From 13c71dd15572d37a2aa95b361a106d00f09e1012 Mon Sep 17 00:00:00 2001 From: PhilipWafula Date: Wed, 6 Oct 2021 08:51:43 +0300 Subject: [PATCH] Normalizes addresses --- apps/cic-eth/cic_eth/eth/account.py | 2 +- apps/cic-eth/cic_eth/ext/tx.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/cic-eth/cic_eth/eth/account.py b/apps/cic-eth/cic_eth/eth/account.py index ffcb822d..405b08c0 100644 --- a/apps/cic-eth/cic_eth/eth/account.py +++ b/apps/cic-eth/cic_eth/eth/account.py @@ -85,7 +85,7 @@ def create(self, password, chain_spec_dict): # TODO: It seems infeasible that a can be None in any case, verify if a == None: raise SignerError('create account') - + a = tx_normalize.wallet_address(a) logg.debug('created account {}'.format(a)) # Initialize nonce provider record for account diff --git a/apps/cic-eth/cic_eth/ext/tx.py b/apps/cic-eth/cic_eth/ext/tx.py index f9685ce4..ebe24fef 100644 --- a/apps/cic-eth/cic_eth/ext/tx.py +++ b/apps/cic-eth/cic_eth/ext/tx.py @@ -153,8 +153,8 @@ def list_tx_by_bloom(self, bloomspec, address, chain_spec_dict): times = tx_times(tx['hash'], chain_spec) tx_r = { 'hash': tx['hash'], - 'sender': tx['from'], - 'recipient': tx_address, + 'sender': tx_normalize.wallet_address(tx['from']), + 'recipient': tx_normalize.wallet_address(tx_address), 'source_value': tx_token_value, 'destination_value': tx_token_value, 'source_token': tx['to'],