mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 05:21:03 +00:00
Allow transfer_keep_alive to transfer all free balance (#8125)
This commit is contained in:
committed by
GitHub
parent
84071d6d49
commit
1b2dd6117b
@@ -961,5 +961,18 @@ macro_rules! decl_tests {
|
||||
assert_storage_noop!(assert_eq!(Balances::slash(&1337, 42).1, 42));
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn transfer_keep_alive_all_free_succeed() {
|
||||
<$ext_builder>::default()
|
||||
.existential_deposit(100)
|
||||
.build()
|
||||
.execute_with(|| {
|
||||
assert_ok!(Balances::set_balance(Origin::root(), 1, 100, 100));
|
||||
assert_ok!(Balances::transfer_keep_alive(Some(1).into(), 2, 100));
|
||||
assert_eq!(Balances::total_balance(&1), 100);
|
||||
assert_eq!(Balances::total_balance(&2), 100);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user