diff --git a/src/agent_client.rs b/src/agent_client.rs index 619ca45f..2454cbbf 100644 --- a/src/agent_client.rs +++ b/src/agent_client.rs @@ -437,7 +437,7 @@ fn parse_api_keys( )] struct ConversionRates; -fn parse_conversion_rates(data: conversion_rates::ResponseData) -> Option { +fn parse_conversion_rates(data: conversion_rates::ResponseData) -> Option { use conversion_rates::{ConversionRatesData, ConversionRatesDataValue}; match data { conversion_rates::ResponseData { @@ -445,14 +445,14 @@ fn parse_conversion_rates(data: conversion_rates::ResponseData) -> Option { Some(ConversionRatesData { value: ConversionRatesDataValue { - grt_to_dai: Some(usd_per_grt), + dai_to_grt: Some(grt_per_usd), .. }, .. }), } => { - tracing::debug!(?usd_per_grt); - usd_per_grt.parse::().ok() + tracing::debug!(?grt_per_usd); + grt_per_usd.parse::().ok() } _ => None, } diff --git a/src/indexer_selection/economic_security.rs b/src/indexer_selection/economic_security.rs index 659ed07c..f2e9388b 100644 --- a/src/indexer_selection/economic_security.rs +++ b/src/indexer_selection/economic_security.rs @@ -8,7 +8,7 @@ pub struct EconomicSecurity { pub struct NetworkParameters { pub slashing_percentage: Eventual, - pub usd_to_grt_conversion: Eventual, + pub usd_to_grt_conversion: Eventual, } impl NetworkParameters { diff --git a/src/indexer_selection/mod.rs b/src/indexer_selection/mod.rs index 45890114..d7499d92 100644 --- a/src/indexer_selection/mod.rs +++ b/src/indexer_selection/mod.rs @@ -165,7 +165,7 @@ pub struct UtilityScores { pub struct Inputs { pub slashing_percentage: Eventual, - pub usd_to_grt_conversion: Eventual, + pub usd_to_grt_conversion: Eventual, pub indexers: SharedLookup, pub indexings: SharedLookup, pub special_indexers: Eventual>>, @@ -173,7 +173,7 @@ pub struct Inputs { pub struct InputWriters { pub slashing_percentage: EventualWriter, - pub usd_to_grt_conversion: EventualWriter, + pub usd_to_grt_conversion: EventualWriter, pub indexers: SharedLookupWriter, pub indexings: SharedLookupWriter, pub special_indexers: EventualWriter>>,