Skip to content

Commit 0427a10

Browse files
author
Ludo Galabru
committed
fix: chain mixup, add logs
1 parent 879ed67 commit 0427a10

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,13 @@ impl ChainhookSpecification {
181181

182182
pub fn into_serialized_json(&self) -> JsonValue {
183183
match &self {
184-
Self::Bitcoin(data) => json!({
184+
Self::Stacks(data) => json!({
185185
"chain": "stacks",
186186
"uuid": data.uuid,
187187
"network": data.network,
188188
"predicate": data.predicate,
189189
}),
190-
Self::Stacks(data) => json!({
190+
Self::Bitcoin(data) => json!({
191191
"chain": "bitcoin",
192192
"uuid": data.uuid,
193193
"network": data.network,

components/chainhook-sdk/src/observer/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1208,12 +1208,12 @@ pub async fn start_observer_commands_handler(
12081208
if let Some(ref tx) = observer_events_tx {
12091209
let _ = tx.send(ObserverEvent::PredicateRegistered(spec));
12101210
} else {
1211-
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate"));
1211+
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate {}", spec.uuid()));
12121212
chainhook_store.predicates.enable_specification(&mut spec);
12131213
}
12141214
}
12151215
ObserverCommand::EnablePredicate(mut spec) => {
1216-
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate"));
1216+
ctx.try_log(|logger| slog::info!(logger, "Enabling Predicate {}", spec.uuid()));
12171217
chainhook_store.predicates.enable_specification(&mut spec);
12181218
if let Some(ref tx) = observer_events_tx {
12191219
let _ = tx.send(ObserverEvent::PredicateEnabled(spec));

0 commit comments

Comments
 (0)