mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
Migrate to Weight::from_parts (#2245)
* Migrate to from_parts Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix remaining files Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Use Master Cargo.lock Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p polkadot-primitives Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * cargo update -p sp-io Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
cf3ddb831c
commit
70a0864e4c
@@ -65,7 +65,7 @@ fn test_asset_xcm_trader() {
|
||||
// Because of the ED being higher in statemine
|
||||
// and not to complicate things, we use a little
|
||||
// bit more of weight
|
||||
let bought = Weight::from_ref_time(400_000_000_000u64);
|
||||
let bought = Weight::from_parts(400_000_000_000u64, 0);
|
||||
|
||||
// Lets calculate amount needed
|
||||
let asset_amount_needed =
|
||||
@@ -147,7 +147,7 @@ fn test_asset_xcm_trader_with_refund() {
|
||||
// Because of the ED being higher in statemine
|
||||
// and not to complicate things, we use a little
|
||||
// bit more of weight
|
||||
let bought = Weight::from_ref_time(400_000_000_000u64);
|
||||
let bought = Weight::from_parts(400_000_000_000u64, 0);
|
||||
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
@@ -220,7 +220,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() {
|
||||
// Because of the ED being higher in statemine
|
||||
// and not to complicate things, we use a little
|
||||
// bit more of weight
|
||||
let bought = Weight::from_ref_time(50_000_000_000u64);
|
||||
let bought = Weight::from_parts(50_000_000_000u64, 0);
|
||||
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
@@ -271,7 +271,7 @@ fn test_that_buying_ed_refund_does_not_refund() {
|
||||
RuntimeHelper::<Runtime>::run_to_block(2, Some(AccountId::from(ALICE)));
|
||||
|
||||
// We are gonna buy ED
|
||||
let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap());
|
||||
let bought = Weight::from_parts(ExistentialDeposit::get().try_into().unwrap(), 0);
|
||||
|
||||
let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap();
|
||||
|
||||
@@ -346,7 +346,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() {
|
||||
// Because of the ED being higher in statemine
|
||||
// and not to complicate things, we use a little
|
||||
// bit more of weight
|
||||
let bought = Weight::from_ref_time(400_000_000_000u64);
|
||||
let bought = Weight::from_parts(400_000_000_000u64, 0);
|
||||
|
||||
// lets calculate amount needed
|
||||
let asset_amount_needed = WeightToFee::weight_to_fee(&bought);
|
||||
|
||||
Reference in New Issue
Block a user