Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
gmart7t2 committed Jan 5, 2024
1 parent 74a892d commit 6211127
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/inscriptions/envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,10 @@ impl From<RawEnvelope> for ParsedEnvelope {
}

impl ParsedEnvelope {
pub(crate) fn from_transaction(transaction: &Transaction, filter: Option<String>) -> Vec<Self> {
pub(crate) fn from_transaction(transaction: &Transaction) -> Vec<Self> {
RawEnvelope::from_transaction(transaction)
.into_iter()
.map(|envelope| envelope.into())
.filter(|envelope: &ParsedEnvelope| match &filter {
Some(filter) => match envelope.payload.metaprotocol.clone() {
Some(metaprotocol) => metaprotocol.to_vec().starts_with(filter.as_bytes()),
None => false,
}
None => true,
})
.collect()
}
}
Expand Down

0 comments on commit 6211127

Please sign in to comment.