Skip to content

Commit

Permalink
lp-gateway: Rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Aug 16, 2024
1 parent e413e2f commit b3f2f07
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
9 changes: 3 additions & 6 deletions pallets/liquidity-pools-gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
11 changes: 9 additions & 2 deletions pallets/liquidity-pools-gateway/src/message_processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down Expand Up @@ -412,7 +412,7 @@ impl<T: Config> Pallet<T> {
let message_hash = submessage.get_message_hash();

let inbound_entry: InboundEntry<T> = InboundEntry::create(
submessage,
submessage.clone(),
session_id,
domain_address.clone(),
expected_proof_count,
Expand All @@ -421,6 +421,13 @@ impl<T: Config> Pallet<T> {
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,
Expand Down

0 comments on commit b3f2f07

Please sign in to comment.