From 44ea4af9a98be0956f87b509ad61f7fa5b85e33e Mon Sep 17 00:00:00 2001 From: Andrew McKenzie Date: Fri, 20 Dec 2024 15:43:51 +0000 Subject: [PATCH] testing without helium lib as a dep of mobile config --- Cargo.lock | 1 - mobile_config/Cargo.toml | 1 - mobile_config/src/client/sub_dao_client.rs | 5 ++--- mobile_verifier/src/cli/reward_from_db.rs | 2 +- mobile_verifier/src/rewarder.rs | 2 +- mobile_verifier/tests/integrations/common/mod.rs | 3 +-- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 15c7b435b..3afb82266 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5046,7 +5046,6 @@ dependencies = [ "futures", "futures-util", "helium-crypto", - "helium-lib", "helium-proto 0.1.0 (git+https://github.com/helium/proto?branch=andymck%2Fsub-dao-epoch-support)", "hextree", "http 0.2.11", diff --git a/mobile_config/Cargo.toml b/mobile_config/Cargo.toml index a6156f19e..ae323e008 100644 --- a/mobile_config/Cargo.toml +++ b/mobile_config/Cargo.toml @@ -22,7 +22,6 @@ file-store = { path = "../file_store" } futures = { workspace = true } futures-util = { workspace = true } helium-crypto = { workspace = true, features = ["sqlx-postgres"] } -helium-lib = { workspace = true } helium-proto = { workspace = true } humantime = { workspace = true } humantime-serde = { workspace = true } diff --git a/mobile_config/src/client/sub_dao_client.rs b/mobile_config/src/client/sub_dao_client.rs index b33bf5678..adcba54ac 100644 --- a/mobile_config/src/client/sub_dao_client.rs +++ b/mobile_config/src/client/sub_dao_client.rs @@ -2,7 +2,6 @@ use super::{call_with_retry, ClientError, Settings}; use crate::sub_dao_epoch_reward_info::EpochRewardInfo; use file_store::traits::MsgVerify; use helium_crypto::{Keypair, PublicKey, Sign}; -use helium_lib::keypair::Pubkey; use helium_proto::{ services::{ sub_dao::{self, SubDaoEpochRewardInfoReqV1}, @@ -35,7 +34,7 @@ pub trait SubDaoEpochRewardInfoResolver: Clone + Send + Sync + 'static { async fn resolve_info( &self, - sub_dao: &Pubkey, + sub_dao: &str, epoch: u64, ) -> Result, Self::Error>; } @@ -46,7 +45,7 @@ impl SubDaoEpochRewardInfoResolver for SubDaoClient { async fn resolve_info( &self, - sub_dao: &Pubkey, + sub_dao: &str, epoch: u64, ) -> Result, Self::Error> { let mut request = SubDaoEpochRewardInfoReqV1 { diff --git a/mobile_verifier/src/cli/reward_from_db.rs b/mobile_verifier/src/cli/reward_from_db.rs index f00fe9400..779e8c8e8 100644 --- a/mobile_verifier/src/cli/reward_from_db.rs +++ b/mobile_verifier/src/cli/reward_from_db.rs @@ -36,7 +36,7 @@ impl Cmd { let sub_dao = resolve_subdao_pubkey(); let reward_info = sub_dao_rewards_client - .resolve_info(&sub_dao, reward_epoch) + .resolve_info(&sub_dao.to_string(), reward_epoch) .await? .ok_or(anyhow::anyhow!( "No reward info found for epoch {}", diff --git a/mobile_verifier/src/rewarder.rs b/mobile_verifier/src/rewarder.rs index 3eaf24f48..6f264b636 100644 --- a/mobile_verifier/src/rewarder.rs +++ b/mobile_verifier/src/rewarder.rs @@ -251,7 +251,7 @@ where pub async fn reward(&self, next_reward_epoch: u64) -> anyhow::Result<()> { let reward_info = self .sub_dao_epoch_reward_client - .resolve_info(&self.sub_dao, next_reward_epoch) + .resolve_info(&self.sub_dao.to_string(), next_reward_epoch) .await? .ok_or(anyhow::anyhow!( "No reward info found for epoch {}", diff --git a/mobile_verifier/tests/integrations/common/mod.rs b/mobile_verifier/tests/integrations/common/mod.rs index 32aec3fdf..aaeea9e60 100644 --- a/mobile_verifier/tests/integrations/common/mod.rs +++ b/mobile_verifier/tests/integrations/common/mod.rs @@ -5,7 +5,6 @@ use file_store::{ }; use futures::{stream, StreamExt}; use helium_crypto::PublicKeyBinary; -use helium_lib::keypair::Pubkey; use helium_lib::token::Token; use helium_proto::services::{ mobile_config::NetworkKeyRole, @@ -80,7 +79,7 @@ impl SubDaoEpochRewardInfoResolver for MockSubDaoRewardsClient { async fn resolve_info( &self, - _sub_dao: &Pubkey, + _sub_dao: &str, _epoch: u64, ) -> Result, Self::Error> { Ok(self.info.clone())