diff --git a/pallets/liquidity-pools-gateway/src/lib.rs b/pallets/liquidity-pools-gateway/src/lib.rs index 16e39e836d..2fd6e75c2f 100644 --- a/pallets/liquidity-pools-gateway/src/lib.rs +++ b/pallets/liquidity-pools-gateway/src/lib.rs @@ -662,12 +662,9 @@ pub mod pallet { (res, weight) } - GatewayMessage::Outbound { - sender, - message, - router_id, - } => { - let res = T::MessageSender::send(router_id, sender, message.serialize()); + GatewayMessage::Outbound { message, router_id } => { + let res = + T::MessageSender::send(router_id, T::Sender::get(), message.serialize()); (res, LP_DEFENSIVE_WEIGHT) } diff --git a/pallets/liquidity-pools-gateway/src/message_processing.rs b/pallets/liquidity-pools-gateway/src/message_processing.rs index eac35c05c9..377b6b7a9c 100644 --- a/pallets/liquidity-pools-gateway/src/message_processing.rs +++ b/pallets/liquidity-pools-gateway/src/message_processing.rs @@ -5,7 +5,7 @@ use cfg_types::domain_address::{Domain, DomainAddress}; use frame_support::{ dispatch::DispatchResult, ensure, - pallet_prelude::{Decode, Encode, Get, TypeInfo}, + pallet_prelude::{Decode, Encode, TypeInfo}, }; use parity_scale_codec::MaxEncodedLen; use sp_arithmetic::traits::{EnsureAddAssign, EnsureSub, SaturatedConversion}; @@ -412,7 +412,7 @@ impl Pallet { let message_hash = submessage.get_message_hash(); let inbound_entry: InboundEntry = InboundEntry::create( - submessage, + submessage.clone(), session_id, domain_address.clone(), expected_proof_count, @@ -421,6 +421,13 @@ impl Pallet { inbound_entry.validate(&router_ids, &router_id.clone())?; Self::upsert_pending_entry(message_hash, &router_id, inbound_entry)?; + Self::deposit_processing_event( + domain_address.clone(), + submessage, + message_hash, + router_id.clone(), + ); + Self::execute_if_requirements_are_met( message_hash, &router_ids,