filter_map instead of unwrap

This commit is contained in:
Bryan Stitt 2023-09-20 10:14:21 -07:00
parent dc037e663a
commit ac2f518174

@ -240,7 +240,7 @@ pub async fn user_balance_post(
let uncle_hashes: HashSet<_> = uncle_hashes
.into_iter()
.map(|x| serde_json::from_str(x.block_hash.as_str()).unwrap())
.filter_map(|x| serde_json::from_str(x.block_hash.as_str()).ok())
.collect();
{