mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
Remove deprecated pallet_balances's set_balance_deprecated and transfer dispatchables (#1226)
* remove deprecated dispatchables * update test * update tests * update tests * add prdocs * add prdoc * Update docs/prdoc/pr_1226.prdoc Co-authored-by: Chevdor <chevdor@users.noreply.github.com> * move prdoc file --------- Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com> Co-authored-by: Chevdor <chevdor@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ fn can_pause_specific_call() {
|
||||
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer")
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death")
|
||||
));
|
||||
|
||||
assert_err!(
|
||||
@@ -69,7 +69,7 @@ fn can_unpause_specific_call() {
|
||||
new_test_ext().execute_with(|| {
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
assert_err!(
|
||||
call_transfer(2, 1).dispatch(RuntimeOrigin::signed(2)),
|
||||
@@ -78,7 +78,7 @@ fn can_unpause_specific_call() {
|
||||
|
||||
assert_ok!(TxPause::unpause(
|
||||
RuntimeOrigin::signed(mock::UnpauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
assert_ok!(call_transfer(4, 1).dispatch(RuntimeOrigin::signed(0)));
|
||||
});
|
||||
@@ -92,7 +92,7 @@ fn can_filter_balance_in_batch_when_paused() {
|
||||
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
|
||||
assert_ok!(batch_call.clone().dispatch(RuntimeOrigin::signed(0)));
|
||||
@@ -111,7 +111,7 @@ fn can_filter_balance_in_proxy_when_paused() {
|
||||
new_test_ext().execute_with(|| {
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
|
||||
assert_ok!(Proxy::add_proxy(RuntimeOrigin::signed(1), 2, ProxyType::JustTransfer, 0));
|
||||
@@ -152,7 +152,7 @@ fn fails_to_pause_unpausable_call_when_other_call_is_paused() {
|
||||
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
|
||||
assert_ok!(call_transfer_keep_alive(3, 1).dispatch(RuntimeOrigin::signed(3)));
|
||||
@@ -181,13 +181,13 @@ fn fails_to_pause_already_paused_pallet() {
|
||||
new_test_ext().execute_with(|| {
|
||||
assert_ok!(TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
));
|
||||
|
||||
assert_noop!(
|
||||
TxPause::pause(
|
||||
RuntimeOrigin::signed(mock::PauseOrigin::get()),
|
||||
full_name::<Test>(b"Balances", b"transfer"),
|
||||
full_name::<Test>(b"Balances", b"transfer_allow_death"),
|
||||
),
|
||||
Error::<Test>::IsPaused
|
||||
);
|
||||
@@ -208,7 +208,7 @@ fn fails_to_unpause_not_paused_pallet() {
|
||||
}
|
||||
|
||||
pub fn call_transfer(dest: u64, value: u64) -> RuntimeCall {
|
||||
RuntimeCall::Balances(pallet_balances::Call::transfer { dest, value })
|
||||
RuntimeCall::Balances(pallet_balances::Call::transfer_allow_death { dest, value })
|
||||
}
|
||||
|
||||
pub fn call_transfer_keep_alive(dest: u64, value: u64) -> RuntimeCall {
|
||||
|
||||
Reference in New Issue
Block a user