bitcoind: use and_then instead of map().flatten()

This commit is contained in:
Antoine Poinsot 2022-10-12 17:25:22 +02:00
parent 51f11a9e2f
commit 7513bcbf09
No known key found for this signature in database
GPG Key ID: E13FC145CD3F4304

View File

@ -767,8 +767,7 @@ impl From<Json> for GetTxRes {
.map(|bt| bt as u32);
let conflicting_txs = json
.get("walletconflicts")
.map(|v| Json::as_array(&v))
.flatten()
.and_then(Json::as_array)
.map(|array| {
array
.into_iter()