File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1116,7 +1116,7 @@ fn add_stake_v2_without_proxy_fails() {
11161116 let ret = SubtensorChainExtension :: < mock:: Test > :: dispatch ( & mut env) ;
11171117
11181118 // Should fail with NotProxy error
1119- assert ! ( ret. is_err ( ) ) ;
1119+ assert ! ( matches! ( ret, Err ( DispatchError :: Other ( "NotProxy" ) ) ) ) ;
11201120 } ) ;
11211121}
11221122
@@ -1460,10 +1460,8 @@ fn transfer_stake_v2_requires_transfer_proxy() {
14601460 . with_expected_weight ( expected_weight) ;
14611461
14621462 let ret = SubtensorChainExtension :: < mock:: Test > :: dispatch ( & mut env) ;
1463- assert ! (
1464- ret. is_err( ) ,
1465- "Staking proxy should not work for transfer_stake"
1466- ) ;
1463+ // Staking proxy should not work for transfer_stake - requires Transfer proxy
1464+ assert ! ( matches!( ret, Err ( DispatchError :: Other ( "NotProxy" ) ) ) ) ;
14671465
14681466 // Remove Staking proxy, add Transfer proxy
14691467 assert_ok ! ( pallet_subtensor_proxy:: Pallet :: <mock:: Test >:: remove_proxy(
You can’t perform that action at this time.
0 commit comments