From e07ed88c7204e82581cb9d2a16f4e6ba83c8302c Mon Sep 17 00:00:00 2001 From: Spencer Ofwiti Date: Mon, 22 Feb 2021 16:48:50 +0300 Subject: [PATCH] Bug fix. --- apps/contract-migration/scripts/{README => README.md} | 0 apps/contract-migration/scripts/import_users.py | 2 +- apps/contract-migration/scripts/verify.py | 3 +-- 3 files changed, 2 insertions(+), 3 deletions(-) rename apps/contract-migration/scripts/{README => README.md} (100%) diff --git a/apps/contract-migration/scripts/README b/apps/contract-migration/scripts/README.md similarity index 100% rename from apps/contract-migration/scripts/README rename to apps/contract-migration/scripts/README.md diff --git a/apps/contract-migration/scripts/import_users.py b/apps/contract-migration/scripts/import_users.py index 1cc5429c..74d791c2 100644 --- a/apps/contract-migration/scripts/import_users.py +++ b/apps/contract-migration/scripts/import_users.py @@ -142,7 +142,7 @@ if __name__ == '__main__': new_address = register_eth(i, u) if u.identities.get('evm') == None: u.identities['evm'] = {} - subchain_str = '{}:{}'.format(chain_spec.common_name(), chain_spec.network_id()) + sub_chain_str = '{}:{}'.format(chain_spec.common_name(), chain_spec.network_id()) u.identities['evm'][sub_chain_str] = [new_address] register_ussd(u) diff --git a/apps/contract-migration/scripts/verify.py b/apps/contract-migration/scripts/verify.py index 0fb4a413..ff6a032e 100644 --- a/apps/contract-migration/scripts/verify.py +++ b/apps/contract-migration/scripts/verify.py @@ -254,7 +254,6 @@ def main(): balances = {} f = open('{}/balances.csv'.format(user_dir, 'r')) - remove_zeros = 10**12 i = 0 while True: l = f.readline() @@ -266,7 +265,7 @@ def main(): sys.stdout.write('loading balance {} {}'.format(i, address).ljust(200) + "\r") except ValueError: break - balance = int(int(r[1].rstrip()) / remove_zeros) + balance = int(r[1].rstrip()) balances[address] = balance i += 1