Skip to content

Commit

Permalink
fix clippy (paritytech#1664)
Browse files Browse the repository at this point in the history
  • Loading branch information
svyatonik authored and serban300 committed Apr 8, 2024
1 parent 70cf252 commit b84a3cb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bridges/relays/client-substrate/src/guard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ pub fn abort_when_account_balance_decreased<C: ChainWithBalances>(
let current_time = env.now();

// remember balances that are beyound 24h border
let time_border = current_time - DAY;
while balances.front().map(|(time, _)| *time < time_border).unwrap_or(false) {
balances.pop_front();
if let Some(time_border) = current_time.checked_sub(DAY) {
while balances.front().map(|(time, _)| *time < time_border).unwrap_or(false) {
balances.pop_front();
}
}

// read balance of the account
Expand Down

0 comments on commit b84a3cb

Please sign in to comment.