Remove duplicates when searching profiles by wallet address

This commit is contained in:
silverpill 2022-05-26 11:35:33 +00:00
parent 80880555bf
commit a3716079d7

View file

@ -412,7 +412,7 @@ pub async fn search_profile_by_wallet_address(
let is_verified: bool = row.try_get("is_verified")?;
if is_verified {
verified.push(profile);
} else {
} else if !verified.iter().any(|item| item.id == profile.id) {
unverified.push(profile);
};
};