File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed
Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -183,8 +183,6 @@ pub mod pallet {
183183 /// Dispatch the given `call` from an account that the sender is authorised for through
184184 /// `add_proxy`.
185185 ///
186- /// Removes any corresponding announcement(s).
187- ///
188186 /// The dispatch origin for this call must be _Signed_.
189187 ///
190188 /// Parameters:
Original file line number Diff line number Diff line change @@ -288,6 +288,23 @@ fn announcer_must_be_proxy() {
288288 } ) ;
289289}
290290
291+ #[ test]
292+ fn calling_proxy_doesnt_remove_announcement ( ) {
293+ new_test_ext ( ) . execute_with ( || {
294+ assert_ok ! ( Proxy :: add_proxy( RuntimeOrigin :: signed( 1 ) , 2 , ProxyType :: Any , 0 ) ) ;
295+
296+ let call = Box :: new ( call_transfer ( 6 , 1 ) ) ;
297+ let call_hash = BlakeTwo256 :: hash_of ( & call) ;
298+
299+ assert_ok ! ( Proxy :: announce( RuntimeOrigin :: signed( 2 ) , 1 , call_hash) ) ;
300+ assert_ok ! ( Proxy :: proxy( RuntimeOrigin :: signed( 2 ) , 1 , None , call) ) ;
301+
302+ // The announcement is not removed by calling proxy.
303+ let announcements = Announcements :: < Test > :: get ( 2 ) ;
304+ assert_eq ! ( announcements. 0 , vec![ Announcement { real: 1 , call_hash, height: 1 } ] ) ;
305+ } ) ;
306+ }
307+
291308#[ test]
292309fn delayed_requires_pre_announcement ( ) {
293310 new_test_ext ( ) . execute_with ( || {
You can’t perform that action at this time.
0 commit comments