Skip to content

Commit

Permalink
Merge pull request #134 from starknet-id/ref/decrease_queries_achieve…
Browse files Browse the repository at this point in the history
…ments

fix: tvl achievement
  • Loading branch information
Th0rgal authored Nov 20, 2023
2 parents baaa888 + 5c2d047 commit ea6ca07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/endpoints/achievements/batched/verify_tvl_batched.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub async fn handler(
}

let url = format!(
"https://stack.starkendefi.xyz/public/aggregates/{}",
"https://public.starkendefi.xyz/public/aggregates/{}",
to_hex(addr)
);
let client = reqwest::Client::new();
Expand All @@ -41,9 +41,9 @@ pub async fn handler(
let mut achieved: Vec<u32> = vec![];
for achievement in achievements.achievements {
if !achievement.completed
&& (achievement.id == 11 && total_tvl_dollars >= 100.0)
|| (achievement.id == 12 && total_tvl_dollars >= 1000.0)
|| (achievement.id == 13 && total_tvl_dollars >= 10000.0)
&& ((achievement.id == 11 && total_tvl_dollars >= 100.0)
|| (achievement.id == 12 && total_tvl_dollars >= 1000.0)
|| (achievement.id == 13 && total_tvl_dollars >= 10000.0))
{
match state
.upsert_completed_achievement(addr, achievement.id)
Expand Down

0 comments on commit ea6ca07

Please sign in to comment.