Remove Default bound on AccountId types under the xcm directory (#4712)

* Refactor ParentIsDefault to ParentIsAllZeroes

* Remove Default bound on all AccountId types under the xcm directory

* Change to ParentIs<A: Get<AccountId>, AccountId>

* Provide a better account for ParentIs

* Fixes

* Fixes

* Fixes

* Fixes

* Update xcm/xcm-builder/src/currency_adapter.rs

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Use preset account ID value for parent MultiLocations

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Keith Yeung
2022-01-21 03:03:39 -08:00
committed by GitHub
parent 3d61cc01db
commit efe290490a
7 changed files with 36 additions and 25 deletions
@@ -39,7 +39,7 @@ use xcm::{latest::prelude::*, VersionedXcm};
use xcm_builder::{
AccountId32Aliases, AllowUnpaidExecutionFrom, CurrencyAdapter as XcmCurrencyAdapter,
EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, IsConcrete, LocationInverter,
NativeAsset, ParentIsDefault, SiblingParachainConvertsVia, SignedAccountId32AsNative,
NativeAsset, ParentIsPreset, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SignedToAccountId32, SovereignSignedViaLocation,
};
use xcm_executor::{Config, XcmExecutor};
@@ -108,7 +108,7 @@ parameter_types! {
}
pub type LocationToAccountId = (
ParentIsDefault<AccountId>,
ParentIsPreset<AccountId>,
SiblingParachainConvertsVia<Sibling, AccountId>,
AccountId32Aliases<RelayNetwork, AccountId>,
);