Skip to content

Commit

Permalink
replace MultiLocation with Location
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthDesai committed Mar 19, 2024
1 parent 625a5fb commit 52a9968
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions pallets/foreign-asset-creator/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ impl Config for Test {
type ForeignAssetDestroyerOrigin = EnsureRoot<AccountId>;
type Fungibles = Assets;
type WeightInfo = ();
type OnForeignAssetCreated = NoteDownHook<MultiLocation, AssetId, Balance>;
type OnForeignAssetDestroyed = NoteDownHook<MultiLocation, AssetId, Balance>;
type OnForeignAssetCreated = NoteDownHook<Location, AssetId, Balance>;
type OnForeignAssetDestroyed = NoteDownHook<Location, AssetId, Balance>;
}

pub(crate) struct ExtBuilder {
Expand Down
14 changes: 7 additions & 7 deletions pallets/foreign-asset-creator/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ fn creating_foreign_works() {
);
expect_events(vec![crate::Event::ForeignAssetCreated {
asset_id: 1,
foreign_asset: MultiLocation::parent(),
foreign_asset: Location::parent(),
}]);

let (foreign_asset, asset_id, min_balance): (MultiLocation, u32, u64) =
let (foreign_asset, asset_id, min_balance): (Location, u32, u64) =
get_asset_created_hook_invocation()
.expect("Decoding of invocation data should not fail");
assert_eq!(foreign_asset, MultiLocation::parent());
assert_eq!(foreign_asset, Location::parent());
assert_eq!(asset_id, 1u32);
assert_eq!(min_balance, 1u64);
});
Expand Down Expand Up @@ -212,10 +212,10 @@ fn test_destroy_foreign_asset_also_removes_everything() {
1u64,
));

let (foreign_asset, asset_id, min_balance): (MultiLocation, u32, u64) =
let (foreign_asset, asset_id, min_balance): (Location, u32, u64) =
get_asset_created_hook_invocation()
.expect("Decoding of invocation data should not fail");
assert_eq!(foreign_asset, MultiLocation::parent());
assert_eq!(foreign_asset, Location::parent());
assert_eq!(asset_id, 1u32);
assert_eq!(min_balance, 1u64);

Expand All @@ -239,9 +239,9 @@ fn test_destroy_foreign_asset_also_removes_everything() {
},
]);

let (foreign_asset, asset_id): (MultiLocation, u32) = get_asset_destroyed_hook_invocation()
let (foreign_asset, asset_id): (Location, u32) = get_asset_destroyed_hook_invocation()
.expect("Decoding of invocation data should not fail");
assert_eq!(foreign_asset, MultiLocation::parent());
assert_eq!(foreign_asset, Location::parent());
assert_eq!(asset_id, 1u32);
});
}

0 comments on commit 52a9968

Please sign in to comment.