From 627c359645a2659392093bcf5f10a4b8931af1f0 Mon Sep 17 00:00:00 2001 From: yenicelik Date: Sun, 25 Jun 2023 21:19:13 -0400 Subject: [PATCH] mixed up directions --- web3_proxy/src/stats/influxdb_queries.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web3_proxy/src/stats/influxdb_queries.rs b/web3_proxy/src/stats/influxdb_queries.rs index 8f9135b8..813707ad 100644 --- a/web3_proxy/src/stats/influxdb_queries.rs +++ b/web3_proxy/src/stats/influxdb_queries.rs @@ -65,8 +65,8 @@ pub async fn query_user_stats<'a>( { // TODO: We should add the threshold that determines if a user is premium into app.config or so Some(user_balance) => { - if user_balance.total_spent_outside_free_tier - user_balance.total_deposits - < Decimal::from(0) + if user_balance.total_deposits - user_balance.total_spent_outside_free_tier + <= Decimal::from(0) { trace!("User has 0 balance"); return Err(Web3ProxyError::PaymentRequired);