From fb8db3ffd2c347f0fd56f96ba305fc1b5670a05b Mon Sep 17 00:00:00 2001 From: Philip Wafula Date: Sat, 18 Sep 2021 09:07:05 +0000 Subject: [PATCH] Philip/ussd cli fix --- apps/cic-eth-aux/erc20-demurrage-token/requirements.txt | 5 ++--- apps/cic-eth/requirements.txt | 2 +- apps/cic-eth/tools_requirements.txt | 2 +- apps/cic-ussd/cic_ussd/state_machine/logic/account.py | 5 ++--- apps/cic-ussd/config/client/app.ini | 2 -- apps/cic-ussd/config/client/ussd.ini | 1 + apps/cic-ussd/requirements.txt | 2 +- apps/data-seeding/requirements.txt | 2 +- docker-compose.yml | 9 ++++----- 9 files changed, 13 insertions(+), 17 deletions(-) delete mode 100644 apps/cic-ussd/config/client/app.ini diff --git a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt index 764056bb..04e3428b 100644 --- a/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt +++ b/apps/cic-eth-aux/erc20-demurrage-token/requirements.txt @@ -1,5 +1,4 @@ celery==4.4.7 erc20-demurrage-token~=0.0.3a1 -cic-eth-registry~=0.5.8a1 -chainlib~=0.0.7a1 -cic_eth~=0.12.2a4 +cic-eth-registry>=0.6.1a2,<0.7.0 +cic-eth[services]~=0.12.4a8 diff --git a/apps/cic-eth/requirements.txt b/apps/cic-eth/requirements.txt index 46482052..61fb0011 100644 --- a/apps/cic-eth/requirements.txt +++ b/apps/cic-eth/requirements.txt @@ -1,3 +1,3 @@ celery==4.4.7 -chainlib-eth>=0.0.9a11,<0.1.0 +chainlib-eth>=0.0.9a14,<0.1.0 semver==2.13.0 diff --git a/apps/cic-eth/tools_requirements.txt b/apps/cic-eth/tools_requirements.txt index 4a6a7fee..f10c88e9 100644 --- a/apps/cic-eth/tools_requirements.txt +++ b/apps/cic-eth/tools_requirements.txt @@ -1,4 +1,4 @@ -crypto-dev-signer>=0.4.15a4,<=0.4.15 +crypto-dev-signer>=0.4.15a7,<=0.4.15 chainqueue>=0.0.5a1,<0.1.0 cic-eth-registry>=0.6.1a2,<0.7.0 redis==3.5.3 diff --git a/apps/cic-ussd/cic_ussd/state_machine/logic/account.py b/apps/cic-ussd/cic_ussd/state_machine/logic/account.py index ca08e41c..13bc13c0 100644 --- a/apps/cic-ussd/cic_ussd/state_machine/logic/account.py +++ b/apps/cic-ussd/cic_ussd/state_machine/logic/account.py @@ -154,15 +154,14 @@ def parse_person_metadata(account: Account, metadata: dict): phone_number = account.phone_number date_registered = int(account.created.replace().timestamp()) blockchain_address = account.blockchain_address - chain_spec = f'{Chain.spec.common_name()}:{Chain.spec.engine()}: {Chain.spec.chain_id()}' + chain_str = Chain.spec.__str__() if isinstance(metadata.get('identities'), dict): identities = metadata.get('identities') else: identities = manage_identity_data( blockchain_address=blockchain_address, - blockchain_type=Chain.spec.engine(), - chain_spec=chain_spec + chain_str=chain_str ) return { diff --git a/apps/cic-ussd/config/client/app.ini b/apps/cic-ussd/config/client/app.ini deleted file mode 100644 index fa041acb..00000000 --- a/apps/cic-ussd/config/client/app.ini +++ /dev/null @@ -1,2 +0,0 @@ -[app] -service_code = *483*46# diff --git a/apps/cic-ussd/config/client/ussd.ini b/apps/cic-ussd/config/client/ussd.ini index 633ad403..1e9d0fd1 100644 --- a/apps/cic-ussd/config/client/ussd.ini +++ b/apps/cic-ussd/config/client/ussd.ini @@ -1,3 +1,4 @@ [ussd] +service_code = *483*46# user = pass = diff --git a/apps/cic-ussd/requirements.txt b/apps/cic-ussd/requirements.txt index 3d274059..66ac133a 100644 --- a/apps/cic-ussd/requirements.txt +++ b/apps/cic-ussd/requirements.txt @@ -6,7 +6,7 @@ celery==4.4.7 cffi==1.14.6 cic-eth[services]~=0.12.4a7 cic-notify~=0.4.0a10 -cic-types~=0.1.0a14 +cic-types~=0.1.0a15 confini>=0.4.1a1,<0.5.0 phonenumbers==8.12.12 psycopg2==2.8.6 diff --git a/apps/data-seeding/requirements.txt b/apps/data-seeding/requirements.txt index 4c445443..eaa28ed8 100644 --- a/apps/data-seeding/requirements.txt +++ b/apps/data-seeding/requirements.txt @@ -1,6 +1,6 @@ sarafu-faucet~=0.0.7a1 cic-eth[tools]~=0.12.4a8 -cic-types~=0.1.0a14 +cic-types~=0.1.0a15 crypto-dev-signer>=0.4.15a4,<=0.4.15 faker==4.17.1 chainsyncer~=0.0.6a3 diff --git a/docker-compose.yml b/docker-compose.yml index c6cfd6eb..4c5b8f5f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,10 +94,11 @@ services: RUN_MASK: ${RUN_MASK:-0} # bit flags; 1: contract migrations 2: seed data DEV_FAUCET_AMOUNT: ${DEV_FAUCET_AMOUNT:-0} DEV_ETH_GAS_PRICE: $DEV_ETH_GAS_PRICE - TOKEN_NAME: ${TOKEN_NAME:-Sarafu Token} - TOKEN_SYMBOL: ${TOKEN_SYMBOL:-GFT} + TOKEN_NAME: ${TOKEN_NAME:-Demurrage Token} + TOKEN_SYMBOL: ${TOKEN_SYMBOL:-DET} TOKEN_DECIMALS: $TOKEN_DECIMALS TOKEN_REDISTRIBUTION_PERIOD: $TOKEN_DEMURRAGE_REDISTRIBUTION_PERIOD + TASKS_TRANSFER_CALLBACKS: ${TASKS_TRANSFER_CALLBACKS:-"cic-eth:cic_eth.callbacks.noop.noop,cic-ussd:cic_ussd.tasks.callback_handler.transaction_callback"} TOKEN_SUPPLY_LIMIT: $TOKEN_SUPPLY_LIMIT TOKEN_DEMURRAGE_LEVEL: $TOKEN_DEMURRAGE_LEVEL TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS @@ -259,7 +260,6 @@ services: CELERY_DEBUG: ${CELERY_DEBUG:-1} #SIGNER_SOCKET_PATH: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000} SIGNER_PROVIDER: ${SIGNER_PROVIDER:-http://cic-eth-signer:8000} - SIGNER_PROVIDER: http://cic-eth-signer:8000 SIGNER_SECRET: ${SIGNER_SECRET:-deadbeef} ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER: ${DEV_ETH_ACCOUNT_ACCOUNTS_INDEX_WRITER:-0xACB0BC74E1686D62dE7DC6414C999EA60C09F0eA} TASKS_TRACE_QUEUE_STATUS: ${TASKS_TRACE_QUEUE_STATUS:-1} @@ -357,10 +357,9 @@ services: CIC_CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996} CHAIN_SPEC: ${CHAIN_SPEC:-evm:bloxberg:8996} CIC_REGISTRY_ADDRESS: $CIC_REGISTRY_ADDRESS - #BANCOR_DIR: $BANCOR_DIR CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://redis} CELERY_RESULT_URL: ${CELERY_RESULT_URL:-redis://redis} - TASKS_TRANSFER_CALLBACKS: $TASKS_TRANSFER_CALLBACKS + TASKS_TRANSFER_CALLBACKS: ${TASKS_TRANSFER_CALLBACKS:-"cic-eth:cic_eth.callbacks.noop.noop,cic-ussd:cic_ussd.tasks.callback_handler.transaction_callback"} restart: on-failure depends_on: - eth