Skip to content

Commit

Permalink
fix reward aggregation to single period
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgrunewald committed Aug 13, 2024
1 parent 867dbfb commit b2540a9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mobile_verifier/src/subscriber_verified_mapping_event.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::Settings;
use chrono::{DateTime, Duration, Utc};
use chrono::{DateTime, Utc};
use file_store::{
file_info_poller::{FileInfoStream, LookbackBehavior},
file_sink::{self, FileSinkClient},
Expand Down Expand Up @@ -246,7 +246,6 @@ async fn save_to_db(
Ok(())
}

const SUBSCRIBER_REWARD_PERIOD_IN_DAYS: i64 = 1;
pub type VerifiedSubscriberVerifiedMappingEventShares =
Vec<VerifiedSubscriberVerifiedMappingEventShare>;

Expand All @@ -270,7 +269,7 @@ pub async fn aggregate_verified_mapping_events(
GROUP BY
subscriber_id;",
)
.bind(reward_period.start - Duration::days(SUBSCRIBER_REWARD_PERIOD_IN_DAYS))
.bind(reward_period.start)
.bind(reward_period.end)
.fetch_all(db)
.await?;
Expand Down

0 comments on commit b2540a9

Please sign in to comment.