Avoid bad pattern of wildcard fees (#3578)

* Avoid bad pattern of wildcard fees

* spelling

* fmt

* Fix runtimes

* spelling
This commit is contained in:
Gavin Wood
2021-08-05 17:44:34 +02:00
committed by GitHub
parent fe5c303893
commit 00d6fc5af0
8 changed files with 51 additions and 10 deletions
+22 -4
View File
@@ -42,7 +42,10 @@ fn send_works() {
let message = Xcm::ReserveAssetDeposit {
assets: vec![ConcreteFungible { id: Parent.into(), amount: SEND_AMOUNT }],
effects: vec![
buy_execution(weight),
buy_execution(
weight,
ConcreteFungible { id: MultiLocation::Null, amount: SEND_AMOUNT },
),
DepositAsset { assets: vec![All], dest: sender.clone() },
],
};
@@ -76,7 +79,10 @@ fn send_fails_when_xcm_router_blocks() {
let message = Xcm::ReserveAssetDeposit {
assets: vec![ConcreteFungible { id: Parent.into(), amount: SEND_AMOUNT }],
effects: vec![
buy_execution(weight),
buy_execution(
weight,
ConcreteFungible { id: MultiLocation::Null, amount: SEND_AMOUNT },
),
DepositAsset { assets: vec![All], dest: sender.clone() },
],
};
@@ -157,7 +163,13 @@ fn reserve_transfer_assets_works() {
Parachain(PARA_ID).into(),
Xcm::ReserveAssetDeposit {
assets: vec![ConcreteFungible { id: Parent.into(), amount: SEND_AMOUNT }],
effects: vec![buy_execution(weight), DepositAsset { assets: vec![All], dest },]
effects: vec![
buy_execution(
weight,
ConcreteFungible { id: Parent.into(), amount: SEND_AMOUNT }
),
DepositAsset { assets: vec![All], dest },
]
}
)]
);
@@ -185,7 +197,13 @@ fn execute_withdraw_to_deposit_works() {
Origin::signed(ALICE),
Box::new(Xcm::WithdrawAsset {
assets: vec![ConcreteFungible { id: MultiLocation::Null, amount: SEND_AMOUNT }],
effects: vec![buy_execution(weight), DepositAsset { assets: vec![All], dest }],
effects: vec![
buy_execution(
weight,
ConcreteFungible { id: MultiLocation::Null, amount: SEND_AMOUNT }
),
DepositAsset { assets: vec![All], dest },
],
}),
weight
));