Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
KiChjang committed Aug 29, 2023
1 parent 58ce029 commit 8853c4a
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ benchmarks_instance_pallet! {
let worst_case_holding = T::worst_case_holding(0);
let asset = T::get_multi_asset();

<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_id: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
// check the assets of origin.
assert!(!T::TransactAsset::balance(&sender_account).is_zero());

Expand All @@ -77,15 +69,7 @@ benchmarks_instance_pallet! {
let dest_location = T::valid_destination()?;
let dest_account = T::AccountIdConverter::convert_location(&dest_location).unwrap();

<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_id: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
assert!(T::TransactAsset::balance(&dest_account).is_zero());

let mut executor = new_executor::<T>(sender_location);
Expand All @@ -104,15 +88,7 @@ benchmarks_instance_pallet! {
let dest_account = T::AccountIdConverter::convert_location(&dest_location).unwrap();

let asset = T::get_multi_asset();
<AssetTransactorOf<T>>::deposit_asset(
&asset,
&sender_location,
&XcmContext {
origin: Some(sender_location.clone()),
message_id: [0; 32],
topic: None,
},
).unwrap();
<AssetTransactorOf<T>>::deposit_asset(&asset, &sender_location, None).unwrap();
let assets: MultiAssets = vec![ asset ].into();
assert!(T::TransactAsset::balance(&dest_account).is_zero());

Expand Down

0 comments on commit 8853c4a

Please sign in to comment.