Skip to content

Commit

Permalink
commit commit
Browse files Browse the repository at this point in the history
let's not have the worst of both worlds where we comment out unused
code.
Remove the printlns, they're not hard to add back in if you need them.
  • Loading branch information
michaeldjeffrey committed Sep 30, 2024
1 parent 39da84c commit 03e0350
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 37 deletions.
3 changes: 1 addition & 2 deletions mobile_verifier/src/service_provider/reward.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,7 @@ mod tests {

fn epoch() -> Range<DateTime<Utc>> {
let now = Utc::now();
let epoch = now - Duration::hours(24)..now;
epoch
now - Duration::hours(24)..now
}

trait PromoRewardFiltersExt {
Expand Down
55 changes: 20 additions & 35 deletions mobile_verifier/tests/integrations/common/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,65 +133,50 @@ impl MockFileSinkReceiver<MobileRewardShare> {

pub async fn receive_gateway_reward(&mut self) -> GatewayReward {
match self.receive("receive_gateway_reward").await {
Some(mobile_reward) => {
// println!("mobile_reward: {:?}", mobile_reward);
match mobile_reward.reward {
Some(MobileReward::GatewayReward(r)) => r,
_ => panic!("failed to get gateway reward"),
}
}
Some(mobile_reward) => match mobile_reward.reward {
Some(MobileReward::GatewayReward(r)) => r,
_ => panic!("failed to get gateway reward"),
},
None => panic!("failed to receive gateway reward"),
}
}

pub async fn receive_service_provider_reward(&mut self) -> ServiceProviderReward {
match self.receive("receive_service_provider_reward").await {
Some(mobile_reward) => {
// println!("mobile_reward: {:?}", mobile_reward);
match mobile_reward.reward {
Some(MobileReward::ServiceProviderReward(r)) => r,
_ => panic!("failed to get service provider reward"),
}
}
Some(mobile_reward) => match mobile_reward.reward {
Some(MobileReward::ServiceProviderReward(r)) => r,
_ => panic!("failed to get service provider reward"),
},
None => panic!("failed to receive service provider reward"),
}
}

pub async fn receive_subscriber_reward(&mut self) -> SubscriberReward {
match self.receive("receive_subscriber_reward").await {
Some(mobile_reward) => {
// println!("mobile_reward: {:?}", mobile_reward);
match mobile_reward.reward {
Some(MobileReward::SubscriberReward(r)) => r,
_ => panic!("failed to get subscriber reward"),
}
}
Some(mobile_reward) => match mobile_reward.reward {
Some(MobileReward::SubscriberReward(r)) => r,
_ => panic!("failed to get subscriber reward"),
},
None => panic!("failed to receive subscriber reward"),
}
}

pub async fn receive_promotion_reward(&mut self) -> PromotionReward {
match self.receive("receive_promotion_reward").await {
Some(mobile_reward) => {
// println!("mobile_reward: {:?}", mobile_reward);
match mobile_reward.reward {
Some(MobileReward::PromotionReward(r)) => r,
_ => panic!("failed to get promotion reward"),
}
}
Some(mobile_reward) => match mobile_reward.reward {
Some(MobileReward::PromotionReward(r)) => r,
_ => panic!("failed to get promotion reward"),
},
None => panic!("failed to receive promotion reward"),
}
}

pub async fn receive_unallocated_reward(&mut self) -> UnallocatedReward {
match self.receive("receive_unallocated_reward").await {
Some(mobile_reward) => {
// println!("mobile_reward: {:?}", mobile_reward);
match mobile_reward.reward {
Some(MobileReward::UnallocatedReward(r)) => r,
_ => panic!("failed to get unallocated reward"),
}
}
Some(mobile_reward) => match mobile_reward.reward {
Some(MobileReward::UnallocatedReward(r)) => r,
_ => panic!("failed to get unallocated reward"),
},
None => panic!("failed to receive unallocated reward"),
}
}
Expand Down

0 comments on commit 03e0350

Please sign in to comment.