diff --git a/migration/src/m20230708_152131_referral_track_one_time_bonus_bonus.rs b/migration/src/m20230708_152131_referral_track_one_time_bonus_bonus.rs
index b0faecaf..7123e118 100644
--- a/migration/src/m20230708_152131_referral_track_one_time_bonus_bonus.rs
+++ b/migration/src/m20230708_152131_referral_track_one_time_bonus_bonus.rs
@@ -43,7 +43,6 @@ impl MigrationTrait for Migration {
#[derive(Iden)]
enum Referee {
Table,
- Id,
CreditsAppliedForReferee,
OneTimeBonusAppliedForReferee,
}
diff --git a/web3_proxy/src/balance.rs b/web3_proxy/src/balance.rs
index 9a2fcd19..503076df 100644
--- a/web3_proxy/src/balance.rs
+++ b/web3_proxy/src/balance.rs
@@ -1,14 +1,9 @@
-use crate::errors::{Web3ProxyResponse, Web3ProxyResult};
+use crate::errors::Web3ProxyResult;
use fstrings::{f, format_args_f};
-use migration::sea_orm::{
- DbBackend, DbConn, FromQueryResult, JsonValue, QueryResult, SqlxMySqlPoolConnection, Statement,
-};
-use migration::{sea_orm, ConnectionTrait};
-use rust_decimal::Decimal;
+use migration::sea_orm;
+use migration::sea_orm::prelude::Decimal;
+use migration::sea_orm::{DbBackend, DbConn, FromQueryResult, Statement};
use serde::{Deserialize, Serialize};
-use serde_json::Value;
-use std::num::NonZeroU64;
-use tracing::info;
/// Implements the balance getter
#[derive(Clone, Debug, Default, Serialize, Deserialize, FromQueryResult)]
@@ -23,61 +18,58 @@ impl Balance {
pub fn remaining(&self) -> Decimal {
self.total_deposits - self.total_spent_paid_credits
}
-}
-pub async fn try_get_balance_from_db(
- db_conn: &DbConn,
- user_id: u64,
-) -> Web3ProxyResult