Skip to content

Commit

Permalink
lp-gateway: Emit event when processing gateway message
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Aug 16, 2024
1 parent 2fc0470 commit 94e591b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pallets/liquidity-pools-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ pub mod pallet {
recovery_router: [u8; 32],
messaging_router: T::RouterId,
},

/// A message has been processed.
ProcessedMessage {
message: GatewayMessage<T::Message, T::RouterId>,
},
}

/// Storage for routers.
Expand Down Expand Up @@ -611,6 +616,10 @@ pub mod pallet {
type Message = GatewayMessage<T::Message, T::RouterId>;

fn process(msg: Self::Message) -> (DispatchResult, Weight) {
Self::deposit_event(Event::<T>::ProcessedMessage {
message: msg.clone(),
});

match msg {
GatewayMessage::Inbound {
domain_address,
Expand Down

0 comments on commit 94e591b

Please sign in to comment.