Skip to content

Commit fcf9fb0

Browse files
author
Ludo Galabru
committed
fix: stacks predicate format
1 parent 572cf20 commit fcf9fb0

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/chainhook-sdk/src/chainhooks/stacks/mod.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::utils::{AbstractStacksBlock, Context};
22

33
use super::types::{
4-
BlockIdentifierIndexRule, HookAction, StacksChainhookSpecification,
4+
BlockIdentifierIndexRule, ExactMatchingRule, HookAction, StacksChainhookSpecification,
55
StacksContractDeploymentPredicate, StacksPredicate,
66
};
77
use chainhook_types::{
@@ -399,7 +399,9 @@ pub fn evaluate_stacks_predicate_on_transaction<'a>(
399399
}
400400
false
401401
}
402-
StacksPredicate::Txid(txid) => txid.eq(&transaction.transaction_identifier.hash),
402+
StacksPredicate::Txid(ExactMatchingRule::Equals(txid)) => {
403+
txid.eq(&transaction.transaction_identifier.hash)
404+
}
403405
StacksPredicate::BlockHeight(_) => unreachable!(),
404406
}
405407
}

components/chainhook-sdk/src/chainhooks/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ pub enum StacksPredicate {
738738
FtEvent(StacksFtEventBasedPredicate),
739739
NftEvent(StacksNftEventBasedPredicate),
740740
StxEvent(StacksStxEventBasedPredicate),
741-
Txid(String),
741+
Txid(ExactMatchingRule),
742742
}
743743

744744
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, JsonSchema)]

0 commit comments

Comments
 (0)