Skip to content

Commit

Permalink
Undo function move
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-stakewise committed Jan 2, 2025
1 parent 279eeb4 commit 62e90ed
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/validators/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,6 @@ async def process_validators(
return tx_hash


async def get_validators_count_from_vault_assets(harvest_params: HarvestParams | None) -> int:
vault_balance = await get_withdrawable_assets(harvest_params)
if settings.network in GNO_NETWORKS:
# apply GNO -> mGNO exchange rate
vault_balance = convert_to_mgno(vault_balance)

metrics.stakeable_assets.set(int(vault_balance))

# calculate number of validators that can be registered
validators_count = vault_balance // DEPOSIT_AMOUNT
return validators_count


async def poll_oracles_approval(
keystore: BaseKeystore | None,
validators: Sequence[Validator],
Expand Down Expand Up @@ -265,6 +252,19 @@ async def poll_oracles_approval(
)


async def get_validators_count_from_vault_assets(harvest_params: HarvestParams | None) -> int:
vault_balance = await get_withdrawable_assets(harvest_params)
if settings.network in GNO_NETWORKS:
# apply GNO -> mGNO exchange rate
vault_balance = convert_to_mgno(vault_balance)

metrics.stakeable_assets.set(int(vault_balance))

# calculate number of validators that can be registered
validators_count = vault_balance // DEPOSIT_AMOUNT
return validators_count


# pylint: disable-next=too-many-arguments,too-many-locals
async def create_approval_request(
protocol_config: ProtocolConfig,
Expand Down

0 comments on commit 62e90ed

Please sign in to comment.