diff --git a/libs/traits/src/liquidity_pools.rs b/libs/traits/src/liquidity_pools.rs index 8d983d272b..51d0717224 100644 --- a/libs/traits/src/liquidity_pools.rs +++ b/libs/traits/src/liquidity_pools.rs @@ -83,11 +83,7 @@ pub trait LpMessageForwarded: Sized { fn unwrap_forwarded(self) -> Option<(Self::Domain, H160, Self)>; /// Attempts to wrap into a forwarded message. - fn try_wrap_forward( - domain: Self::Domain, - forwarding_contract: H160, - message: Self, - ) -> Result; + fn try_wrap_forward(forwarding_contract: H160, message: Self) -> Result; } pub trait RouterProvider: Sized { diff --git a/pallets/liquidity-pools-forwarder/src/lib.rs b/pallets/liquidity-pools-forwarder/src/lib.rs index 78eaf60f47..dc30b839b5 100644 --- a/pallets/liquidity-pools-forwarder/src/lib.rs +++ b/pallets/liquidity-pools-forwarder/src/lib.rs @@ -210,9 +210,7 @@ pub mod pallet { message: T::Message, ) -> DispatchResult { let msg = RouterForwarding::::get(&router_id) - .map(|info| { - T::Message::try_wrap_forward(info.source_domain, info.contract, message.clone()) - }) + .map(|info| T::Message::try_wrap_forward(info.contract, message.clone())) .unwrap_or_else(|| { ensure!(!message.is_forwarded(), Error::::ForwardInfoNotFound); Ok(message) diff --git a/pallets/liquidity-pools-forwarder/src/mock.rs b/pallets/liquidity-pools-forwarder/src/mock.rs index c30bf2fcbb..32bd88ee10 100644 --- a/pallets/liquidity-pools-forwarder/src/mock.rs +++ b/pallets/liquidity-pools-forwarder/src/mock.rs @@ -46,7 +46,7 @@ impl LpMessageForwarded for Message { } } - fn try_wrap_forward(_: Self::Domain, _: H160, message: Self) -> Result { + fn try_wrap_forward(_: H160, message: Self) -> Result { match message { Self::Forward => Err(ERROR_NESTING), Self::NonForward => Ok(Self::Forward), diff --git a/pallets/liquidity-pools/src/message.rs b/pallets/liquidity-pools/src/message.rs index f3b3713023..0c41d19c64 100644 --- a/pallets/liquidity-pools/src/message.rs +++ b/pallets/liquidity-pools/src/message.rs @@ -659,13 +659,9 @@ impl LpMessageForwarded for Message { } } - fn try_wrap_forward( - source_domain: Domain, - forwarding_contract: H160, - message: Self, - ) -> Result { + fn try_wrap_forward(forwarding_contract: H160, message: Self) -> Result { Ok(Self::Forwarded { - source_domain: source_domain.into(), + source_domain: Domain::Centrifuge.into(), forwarding_contract, message: message.try_into().map_err(|_| { DispatchError::Other( diff --git a/runtime/integration-tests/submodules/liquidity-pools b/runtime/integration-tests/submodules/liquidity-pools index 6e8f1a29df..4301885b9a 160000 --- a/runtime/integration-tests/submodules/liquidity-pools +++ b/runtime/integration-tests/submodules/liquidity-pools @@ -1 +1 @@ -Subproject commit 6e8f1a29dff0d7cf5ff74285cfffadae8a8b303f +Subproject commit 4301885b9a3b8ec36f3bda4b789daa5b115c006a