mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 08:11:03 +00:00
Remove BuyExecution::orders (#3640)
* Remove BuyExecution::orders * Fixes * Fixes * Fixes * Formatting
This commit is contained in:
@@ -51,7 +51,6 @@ fn weigher_should_work() {
|
||||
weight: 0,
|
||||
debt: 30,
|
||||
halt_on_error: true,
|
||||
orders: vec![],
|
||||
instructions: vec![],
|
||||
},
|
||||
Order::DepositAsset { assets: All.into(), max_assets: 1, beneficiary: Here.into() },
|
||||
@@ -139,7 +138,6 @@ fn allow_paid_should_work() {
|
||||
weight: 0,
|
||||
debt: 20,
|
||||
halt_on_error: true,
|
||||
orders: vec![],
|
||||
instructions: vec![],
|
||||
},
|
||||
Order::DepositAsset { assets: All.into(), max_assets: 1, beneficiary: Here.into() },
|
||||
@@ -164,7 +162,6 @@ fn allow_paid_should_work() {
|
||||
weight: 0,
|
||||
debt: 30,
|
||||
halt_on_error: true,
|
||||
orders: vec![],
|
||||
instructions: vec![],
|
||||
},
|
||||
Order::DepositAsset { assets: All.into(), max_assets: 1, beneficiary: Here.into() },
|
||||
@@ -206,7 +203,6 @@ fn paying_reserve_deposit_should_work() {
|
||||
weight: 0,
|
||||
debt: 30,
|
||||
halt_on_error: true,
|
||||
orders: vec![],
|
||||
instructions: vec![],
|
||||
},
|
||||
Order::<TestCall>::DepositAsset {
|
||||
@@ -347,7 +343,6 @@ fn paid_transacting_should_refund_payment_for_unused_weight() {
|
||||
weight: 70,
|
||||
debt: 30,
|
||||
halt_on_error: true,
|
||||
orders: vec![],
|
||||
instructions: vec![Xcm::<TestCall>::Transact {
|
||||
origin_type: OriginKind::Native,
|
||||
require_weight_at_most: 60,
|
||||
|
||||
@@ -80,18 +80,13 @@ impl<T: Get<Weight>, C: Decode + GetDispatchInfo> FixedWeightBounds<T, C> {
|
||||
}
|
||||
fn deep_order(order: &mut Order<C>) -> Result<Weight, ()> {
|
||||
Ok(match order {
|
||||
Order::BuyExecution { orders, instructions, .. } => {
|
||||
Order::BuyExecution { instructions, .. } => {
|
||||
let mut extra = 0;
|
||||
for instruction in instructions.iter_mut() {
|
||||
extra.saturating_accrue(
|
||||
Self::shallow(instruction)?.saturating_add(Self::deep(instruction)?),
|
||||
);
|
||||
}
|
||||
for order in orders.iter_mut() {
|
||||
extra.saturating_accrue(
|
||||
Self::shallow_order(order)?.saturating_add(Self::deep_order(order)?),
|
||||
);
|
||||
}
|
||||
extra
|
||||
},
|
||||
_ => 0,
|
||||
|
||||
Reference in New Issue
Block a user