Skip to content

Commit

Permalink
chore: linters
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Aug 22, 2024
1 parent 9a9906b commit 0610fce
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions operate/services/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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(
Expand All @@ -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()

Expand Down

0 comments on commit 0610fce

Please sign in to comment.