refactor: Clean code and update cargo.lock

This commit is contained in:
Florian Pellissier
2024-07-12 15:42:55 +02:00
parent 10a36c0a9b
commit ec6e16f465
3 changed files with 5 additions and 12 deletions

View File

@@ -117,11 +117,7 @@ pub fn map_relative_balances(
let pool_key = format!("pool:{}", hex::encode(transactor));
if let Some(tokens) = tokens_store.get_last(pool_key) {
let token_id = hex::encode(token);
tokens
.split(":")
.map(|token| token.to_owned())
.collect::<Vec<_>>()
.contains(&token_id)
tokens.split(':').any(|t| t == token_id)
} else {
false
}