File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -469,6 +469,35 @@ where
469469 0u32 . into ( ) ,
470470 ) ;
471471
472+ match call_result {
473+ Ok ( _) => Ok ( RetVal :: Converging ( Output :: Success as u32 ) ) ,
474+ Err ( e) => {
475+ let error_code = Output :: from ( e) as u32 ;
476+ Ok ( RetVal :: Converging ( error_code) )
477+ }
478+ }
479+ }
480+ FunctionId :: RemoveProxyV1 => {
481+ let weight = <T as pallet_proxy:: Config >:: WeightInfo :: remove_proxy (
482+ <T as pallet_proxy:: Config >:: MaxProxies :: get ( ) ,
483+ ) ;
484+
485+ env. charge_weight ( weight) ?;
486+
487+ let delegate: T :: AccountId = env
488+ . read_as ( )
489+ . map_err ( |_| DispatchError :: Other ( "Failed to decode input parameters" ) ) ?;
490+
491+ let delegate_lookup =
492+ <<T as frame_system:: Config >:: Lookup as StaticLookup >:: Source :: from ( delegate) ;
493+
494+ let call_result = pallet_proxy:: Pallet :: < T > :: remove_proxy (
495+ RawOrigin :: Signed ( env. caller ( ) ) . into ( ) ,
496+ delegate_lookup,
497+ ProxyType :: Staking ,
498+ 0u32 . into ( ) ,
499+ ) ;
500+
472501 match call_result {
473502 Ok ( _) => Ok ( RetVal :: Converging ( Output :: Success as u32 ) ) ,
474503 Err ( e) => {
You can’t perform that action at this time.
0 commit comments