Deprecate Currency: Companion for #12951 (#6780)

* Some renames

* Fix

* Fix build for new APIs

* Remove diener

* Fixes

* Fixes

* Fix integration tests

* Fixes

* fix nis issuance

* Update Cargo.toml

* Polkadot doesn't have freezes/holds yet

* No networks use freezes/holds

* update lockfile for {"substrate"}

* Fix tests

There are more failing tests; just starting with the easy ones.
Reserved balance does not count towards ED anymore, therefore reducing
all the reserves by ED (1).

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fixes for Polkadot pallets

* Fix parachains benchmarks

* Update Substrate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Gavin Wood
2023-03-20 13:20:22 +00:00
committed by GitHub
parent 67035d6436
commit 2e656dcd6e
33 changed files with 481 additions and 305 deletions
+9 -4
View File
@@ -485,11 +485,10 @@ mod tests {
ord_parameter_types, parameter_types,
traits::{Currency, WithdrawReasons},
};
use pallet_balances::Error as BalancesError;
use sp_runtime::{
testing::Header,
traits::{BlakeTwo256, Dispatchable, IdentifyAccount, Identity, IdentityLookup, Verify},
MultiSignature,
ArithmeticError, MultiSignature,
};
type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<Test>;
@@ -554,6 +553,10 @@ mod tests {
type MaxReserves = ();
type ReserveIdentifier = [u8; 8];
type WeightInfo = ();
type HoldIdentifier = ();
type FreezeIdentifier = ();
type MaxHolds = ConstU32<1>;
type MaxFreezes = ConstU32<1>;
}
parameter_types! {
@@ -815,6 +818,7 @@ mod tests {
);
// Account with vesting
Balances::make_free_balance_be(&alice(), 100);
assert_ok!(<Test as Config>::VestingSchedule::add_vesting_schedule(
&alice(),
100,
@@ -1127,6 +1131,7 @@ mod tests {
// Wrong Origin
assert_noop!(Purchase::payout(RuntimeOrigin::signed(alice()), alice(),), BadOrigin);
// Account with Existing Vesting Schedule
Balances::make_free_balance_be(&bob(), 100);
assert_ok!(
<Test as Config>::VestingSchedule::add_vesting_schedule(&bob(), 100, 1, 50,)
);
@@ -1163,8 +1168,8 @@ mod tests {
Permill::zero(),
));
assert_noop!(
Purchase::payout(RuntimeOrigin::signed(payment_account()), alice(),),
BalancesError::<Test, _>::InsufficientBalance
Purchase::payout(RuntimeOrigin::signed(payment_account()), alice()),
ArithmeticError::Underflow
);
});
}