diff --git a/pallets/liquidity-pools/src/lib.rs b/pallets/liquidity-pools/src/lib.rs index 4da040ccf0..d0bfc6b636 100644 --- a/pallets/liquidity-pools/src/lib.rs +++ b/pallets/liquidity-pools/src/lib.rs @@ -1020,7 +1020,7 @@ pub mod pallet { ensure_root(origin)?; ensure!( - matches!(domain_address.domain(), Domain::EVM(_)), + matches!(domain_address.domain(), Domain::Evm(_)), Error::::InvalidDomain ); @@ -1030,7 +1030,7 @@ pub mod pallet { Message::RecoverAssets { contract: incorrect_contract, asset, - recipient: T::DomainAddressToAccountId::convert(domain_address).into(), + recipient: domain_address.as_local(), amount: amount.into(), }, )?; diff --git a/pallets/liquidity-pools/src/tests.rs b/pallets/liquidity-pools/src/tests.rs index cda396c30b..05499a7f83 100644 --- a/pallets/liquidity-pools/src/tests.rs +++ b/pallets/liquidity-pools/src/tests.rs @@ -1,6 +1,6 @@ use cfg_traits::Seconds; use cfg_types::{ - domain_address::DomainAddress, + domain_address::{Domain, DomainAddress}, permissions::{PermissionScope, PoolRole, Role}, tokens::CurrencyId, }; @@ -1990,17 +1990,16 @@ mod recover_assets { const ASSET: [u8; 32] = [43; 32]; fn config_mocks() { - DomainAddressToAccountId::mock_convert(move |_| ALICE_EVM_LOCAL_ACCOUNT); Permissions::mock_has(|_, _, _| false); Gateway::mock_handle(|sender, destination, msg| { assert_eq!(sender, TreasuryAccount::get()); - assert_eq!(destination, EVM_DOMAIN); + assert_eq!(destination, Domain::Evm(42)); assert_eq!( msg, Message::RecoverAssets { contract: CONTRACT, asset: ASSET, - recipient: ALICE_EVM_LOCAL_ACCOUNT.into(), + recipient: ALICE_EVM_DOMAIN_ADDRESS.as_local(), amount: sp_core::U256::from(AMOUNT).into(), } ); @@ -2070,7 +2069,7 @@ mod recover_assets { assert_noop!( LiquidityPools::recover_assets( RuntimeOrigin::root(), - DomainAddress::Centrifuge(ALICE.into()), + DomainAddress::Local(ALICE.into()), CONTRACT, ASSET, AMOUNT.into(), diff --git a/pallets/liquidity-pools/src/tests/inbound.rs b/pallets/liquidity-pools/src/tests/inbound.rs index 487e65a451..9bb29c225c 100644 --- a/pallets/liquidity-pools/src/tests/inbound.rs +++ b/pallets/liquidity-pools/src/tests/inbound.rs @@ -1,6 +1,6 @@ use cfg_traits::liquidity_pools::InboundMessageHandler; use cfg_types::{ - domain_address::{Domain, DomainAddress}, + domain_address::DomainAddress, permissions::{PermissionScope, PoolRole, Role}, }; use frame_support::{