mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 08:41:02 +00:00
fix clippy (#1664)
This commit is contained in:
committed by
Bastian Köcher
parent
7b74940539
commit
c03d99cd09
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user