From aa21c18c6e2f64526a3d6772b7b4ae1a79085da3 Mon Sep 17 00:00:00 2001 From: brentstone Date: Tue, 16 Jul 2024 12:04:27 -0600 Subject: [PATCH] fixup! Merge branch 'tiago/masp-ss-client-phase-1' (#3498) --- crates/sdk/src/masp/utils.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/crates/sdk/src/masp/utils.rs b/crates/sdk/src/masp/utils.rs index 29d4cfeb4f..ee1ad86a2c 100644 --- a/crates/sdk/src/masp/utils.rs +++ b/crates/sdk/src/masp/utils.rs @@ -136,15 +136,20 @@ where .block .data; - for (idx, masp_sections_refs) in txs_results { + for (idx, masp_sections_refs, ibc_tx_data_refs) in txs_results { let tx = Tx::try_from(block[idx.0 as usize].as_ref()) .map_err(|e| Error::Other(e.to_string()))?; - let extracted_masp_txs = - if let Some(masp_sections_refs) = masp_sections_refs { - extract_masp_tx(&tx, &masp_sections_refs).await? - } else { - extract_masp_tx_from_ibc_message(&tx)? - }; + let mut extracted_masp_txs = vec![]; + if let Some(masp_sections_refs) = masp_sections_refs { + extracted_masp_txs.extend( + extract_masp_tx(&tx, &masp_sections_refs).await?, + ); + }; + if ibc_tx_data_refs.is_some() { + extracted_masp_txs + .extend(extract_masp_tx_from_ibc_message(&tx)?); + } + tx_sender.send(( IndexedTx { height: height.into(),