From ac2f51817418eca00f0e772c40919ea94468e1ef Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 20 Sep 2023 10:14:21 -0700 Subject: [PATCH] filter_map instead of unwrap --- web3_proxy/src/frontend/users/payment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web3_proxy/src/frontend/users/payment.rs b/web3_proxy/src/frontend/users/payment.rs index 02925d0b..6148d08f 100644 --- a/web3_proxy/src/frontend/users/payment.rs +++ b/web3_proxy/src/frontend/users/payment.rs @@ -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(); {