Skip to content

Commit 2f12d8b

Browse files
committed
Allow IBC memoless shieldings in MASP VP
1 parent 6975621 commit 2f12d8b

File tree

3 files changed

+210
-86
lines changed

3 files changed

+210
-86
lines changed

crates/ibc/src/lib.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -272,20 +272,14 @@ where
272272
{
273273
fn try_extract_masp_tx_from_envelope<Transfer: BorshDeserialize>(
274274
tx_data: &[u8],
275-
) -> StorageResult<Option<masp_primitives::transaction::Transaction>> {
276-
let msg = decode_message::<Transfer>(tx_data)
277-
.into_storage_result()
278-
.ok();
279-
let tx = if let Some(IbcMessage::Envelope(envelope)) = msg {
280-
Some(extract_masp_tx_from_envelope(&envelope).ok_or_else(|| {
281-
StorageError::new_const(
282-
"Missing MASP transaction in IBC message",
283-
)
284-
})?)
275+
) -> Option<masp_primitives::transaction::Transaction> {
276+
let msg = decode_message::<Transfer>(tx_data).ok()?;
277+
278+
if let IbcMessage::Envelope(envelope) = msg {
279+
extract_masp_tx_from_envelope(&envelope)
285280
} else {
286281
None
287-
};
288-
Ok(tx)
282+
}
289283
}
290284

291285
fn apply_ibc_packet<Transfer: BorshDeserialize>(

0 commit comments

Comments
 (0)