Skip to content

Commit

Permalink
chore: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmoreira-valory committed Aug 28, 2024
1 parent 6c3cb7c commit 2c58a21
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions operate/services/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,7 @@ def _terminate_service_on_chain_from_safe( # pylint: disable=too-many-locals
counter_instances = Counter(s.lower() for s in instances)

if counter_current_safe_owners == counter_instances:
self.logger.info("Swapping Safe owners")

self.logger.info("Service funded for safe swap")
self.fund_service(
hash=hash,
rpc=ledger_config.rpc,
Expand All @@ -857,6 +856,7 @@ def _terminate_service_on_chain_from_safe( # pylint: disable=too-many-locals
safe_fund_treshold=0,
)

self.logger.info("Swapping Safe owners")
sftxb.swap( # noqa: E800
service_id=chain_data.token, # noqa: E800
multisig=chain_data.multisig, # TODO this can be read from the registry
Expand Down
7 changes: 5 additions & 2 deletions operate/services/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import contextlib
import io
import json
import logging
import tempfile
import time
import typing as t
Expand Down Expand Up @@ -600,7 +599,6 @@ def swap( # pylint: disable=too-many-arguments,too-many-locals
self, service_id: int, multisig: str, owner_key: str, new_owner_address: str
) -> None:
"""Swap safe owner."""
logging.info(f"Swapping safe for service {service_id} [{multisig}]...")
self._patch()
manager = ServiceManager(
service_id=service_id,
Expand Down Expand Up @@ -710,6 +708,11 @@ def staking_rewards_available(self, staking_contract: str) -> bool:
)
return available_rewards > 0

# def get_agent_bond(self, staking_contract: str) -> int:
# self._patch()




class OnChainManager(_ChainUtil):
"""On chain service management."""
Expand Down

0 comments on commit 2c58a21

Please sign in to comment.