Skip to content

Commit

Permalink
fix: add temporary solution for fees
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWad3r committed Jan 21, 2025
1 parent d7337b9 commit 0694383
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/core/token_wallet/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::convert::TryFrom;
use std::ops::Shr;
use std::sync::Arc;

use crate::core::models::*;
Expand Down Expand Up @@ -247,9 +248,15 @@ impl TokenWallet {
most_recent_bit_price
};

Ok(30000u64
.saturating_mul(gas_config.gas_price)
.saturating_add(100_000_000u64.saturating_mul(storage_fees)))
let fees = if storage_fees > 1 {
600_000_000u64
} else {
30000u64
.saturating_mul(gas_config.gas_price.shr(16))
.saturating_add(100_000_000u64.saturating_mul(storage_fees))
};

Ok(fees)
}

pub async fn prepare_transfer(
Expand Down

0 comments on commit 0694383

Please sign in to comment.