Skip to content

Commit

Permalink
Concatenate instructions and inner instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ameten committed Oct 30, 2024
1 parent e2785b9 commit 85b9d84
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions rust/main/chains/hyperlane-sealevel/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub fn search_dispatched_message_transactions(
_ => return None,
};

let instructions = match meta.inner_instructions {
let inner_instructions = match meta.inner_instructions {
OptionSerializer::Some(ii) => ii
.into_iter()
.flat_map(|ii| ii.instructions)
Expand All @@ -71,11 +71,12 @@ pub fn search_dispatched_message_transactions(
OptionSerializer::None | OptionSerializer::Skip => return None,
};

Some((index, transaction_hash, message, instructions))
let instructions = vec![message.instructions, inner_instructions].concat();

Some((index, transaction_hash, message.account_keys, instructions))
})
.filter_map(|(index, hash, message, instructions)| {
let account_keys = message
.account_keys
.filter_map(|(index, hash, account_keys, instructions)| {
let account_keys = account_keys
.into_iter()
.enumerate()
.map(|(index, key)| (key, index))
Expand Down

0 comments on commit 85b9d84

Please sign in to comment.