Skip to content

Commit

Permalink
fix: update hooker
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiss committed Dec 6, 2024
1 parent cd725f9 commit 702b07f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/solis/src/hooker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl<P: Provider + Sync + Send + 'static + std::fmt::Debug, EF: ExecutorFactory>

async fn on_starknet_tx_failed(&self, call: Call) {
println!("Starknet tx failed: {:?}", call);

println!("orderhash: {:?}:", execution_info.order_hash)
let execution_info = match ExecutionInfo::cairo_deserialize(&call.calldata, 0) {
Ok(execution_info) => execution_info,
Err(e) => {
Expand All @@ -527,9 +527,10 @@ impl<P: Provider + Sync + Send + 'static + std::fmt::Debug, EF: ExecutorFactory>
};

// rollback the status
let status = CancelStatus::CancelledUser;
self.add_l1_handler_transaction_for_orderbook(
selector!("rollback_status_order"),
&[execution_info.order_hash],
&[execution_info.order_hash, status.to_u32().into()],
);
}
}
Expand Down

0 comments on commit 702b07f

Please sign in to comment.