From 0610fce306e754332f1ca35ffc3eddb68a7aa30e Mon Sep 17 00:00:00 2001 From: jmoreira-valory Date: Thu, 22 Aug 2024 19:45:31 +0200 Subject: [PATCH] chore: linters --- operate/services/service.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/operate/services/service.py b/operate/services/service.py index d164e29e3..2107cce56 100644 --- a/operate/services/service.py +++ b/operate/services/service.py @@ -417,7 +417,8 @@ def _build_docker( builder.deplopyment_type = DockerComposeGenerator.deployment_type builder.try_update_abci_connection_params() - home_chain_data = service.chain_configs[service.home_chain_id] + home_chain_data = service.chain_configs[service.home_chain_id].chain_data + home_chain_ledger_config = service.chain_configs[service.home_chain_id].ledger_config builder.try_update_runtime_params( multisig_address=home_chain_data.multisig, agent_instances=home_chain_data.instances, @@ -426,8 +427,8 @@ def _build_docker( ) # TODO: Support for multiledger builder.try_update_ledger_params( - chain=LedgerType(service.ledger_config.type).name.lower(), - address=service.ledger_config.rpc, + chain=LedgerType(home_chain_ledger_config.type).name.lower(), + address=home_chain_ledger_config.rpc, ) # build deployment @@ -773,7 +774,7 @@ def new( # pylint: disable=too-many-locals multisig=DUMMY_MULTISIG, staked=False, on_chain_state=OnChainState.NON_EXISTENT, - user_params=OnChainUserParams.from_json(config), + user_params=OnChainUserParams.from_json(config), # type: ignore ) chain_configs[chain] = ChainConfig( @@ -794,12 +795,12 @@ def new( # pylint: disable=too-many-locals service.store() return service - def update_user_params_from_template(self, service_template: ServiceTemplate): + def update_user_params_from_template(self, service_template: ServiceTemplate) -> None: """Update user params from template.""" for chain, config in service_template["configurations"].items(): self.chain_configs[ chain - ].chain_data.user_params = OnChainUserParams.from_json(config) + ].chain_data.user_params = OnChainUserParams.from_json(config) # type: ignore self.store()