Don't allow self proxies (#7803)

This commit is contained in:
Shawn Tabrizi
2020-12-29 13:31:44 -04:00
committed by GitHub
parent 0b7ae4440c
commit 8c795accc8
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -396,6 +396,7 @@ fn add_remove_proxies_works() {
assert_eq!(Balances::reserved_balance(1), 2);
assert_ok!(Proxy::remove_proxy(Origin::signed(1), 2, ProxyType::JustTransfer, 0));
assert_eq!(Balances::reserved_balance(1), 0);
assert_noop!(Proxy::add_proxy(Origin::signed(1), 1, ProxyType::Any, 0), Error::<Test>::NoSelfProxy);
});
}