diff --git a/pallets/liquidity-pools-gateway/src/lib.rs b/pallets/liquidity-pools-gateway/src/lib.rs index 686a437656..805a30e712 100644 --- a/pallets/liquidity-pools-gateway/src/lib.rs +++ b/pallets/liquidity-pools-gateway/src/lib.rs @@ -264,7 +264,7 @@ pub mod pallet { T::AdminOrigin::ensure_origin(origin)?; ensure!(domain != Domain::Local, Error::::DomainNotSupported); - DomainHookAddress::::insert(domain.clone(), hook_address); + DomainHookAddress::::insert(domain, hook_address); Self::deposit_event(Event::DomainHookAddressSet { domain, @@ -379,7 +379,7 @@ pub mod pallet { ) -> DispatchResult { ensure!(destination != Domain::Local, Error::::DomainNotSupported); - PackedMessage::::mutate((&from, destination.clone()), |batch| match batch { + PackedMessage::::mutate((&from, destination), |batch| match batch { Some(batch) => batch.pack_with(message), None => Self::queue_message(destination, message), }) diff --git a/pallets/liquidity-pools-gateway/src/origin.rs b/pallets/liquidity-pools-gateway/src/origin.rs index 04a3157f9a..a09675b699 100644 --- a/pallets/liquidity-pools-gateway/src/origin.rs +++ b/pallets/liquidity-pools-gateway/src/origin.rs @@ -14,8 +14,6 @@ use cfg_types::domain_address::DomainAddress; use frame_support::traits::EnsureOrigin; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use scale_info::TypeInfo; -#[cfg(feature = "runtime-benchmarks")] -use sp_core::H160; use sp_runtime::RuntimeDebug; #[derive(Clone, Eq, PartialEq, RuntimeDebug, Encode, Decode, MaxEncodedLen, TypeInfo)] @@ -34,9 +32,6 @@ impl> + From> EnsureOrigin fo #[cfg(feature = "runtime-benchmarks")] fn try_successful_origin() -> Result { - Ok(O::from(GatewayOrigin::Domain(DomainAddress::EVM( - 1, - H160::from_low_u64_be(1).into(), - )))) + unimplemented!() } }