@@ -5696,7 +5696,7 @@ describe('SnapController', () => {
5696
5696
snapController . destroy ( ) ;
5697
5697
} ) ;
5698
5698
5699
- it ( 'grants the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is enabled ' , async ( ) => {
5699
+ it ( 'grants the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider`' , async ( ) => {
5700
5700
const rootMessenger = getControllerMessenger ( ) ;
5701
5701
const messenger = getSnapControllerMessenger ( rootMessenger ) ;
5702
5702
@@ -5732,9 +5732,6 @@ describe('SnapController', () => {
5732
5732
getSnapControllerOptions ( {
5733
5733
messenger,
5734
5734
detectSnapLocation : loopbackDetect ( { manifest } ) ,
5735
- featureFlags : {
5736
- useCaip25Permission : true ,
5737
- } ,
5738
5735
} ) ,
5739
5736
) ;
5740
5737
@@ -5778,7 +5775,7 @@ describe('SnapController', () => {
5778
5775
snapController . destroy ( ) ;
5779
5776
} ) ;
5780
5777
5781
- it ( 'grants the `endowment:caip25` permission when updating a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is enabled ' , async ( ) => {
5778
+ it ( 'grants the `endowment:caip25` permission when updating a Snap with `endowment:ethereum-provider`' , async ( ) => {
5782
5779
const newVersion = '1.0.2' ;
5783
5780
const newVersionRange = '>=1.0.1' ;
5784
5781
@@ -5838,9 +5835,6 @@ describe('SnapController', () => {
5838
5835
getSnapControllerOptions ( {
5839
5836
messenger,
5840
5837
detectSnapLocation : detectLocationMock ,
5841
- featureFlags : {
5842
- useCaip25Permission : true ,
5843
- } ,
5844
5838
} ) ,
5845
5839
) ;
5846
5840
@@ -5911,71 +5905,6 @@ describe('SnapController', () => {
5911
5905
controller . destroy ( ) ;
5912
5906
} ) ;
5913
5907
5914
- it ( 'does not grant the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is disabled' , async ( ) => {
5915
- const rootMessenger = getControllerMessenger ( ) ;
5916
- const messenger = getSnapControllerMessenger ( rootMessenger ) ;
5917
-
5918
- rootMessenger . registerActionHandler (
5919
- 'PermissionController:getPermissions' ,
5920
- ( ) => ( { } ) ,
5921
- ) ;
5922
-
5923
- rootMessenger . registerActionHandler (
5924
- 'SelectedNetworkController:getNetworkClientIdForDomain' ,
5925
- ( ) => 'mainnet' ,
5926
- ) ;
5927
-
5928
- rootMessenger . registerActionHandler (
5929
- 'NetworkController:getNetworkClientById' ,
5930
- ( ) => ( {
5931
- configuration : {
5932
- chainId : '0x1' ,
5933
- } ,
5934
- } ) ,
5935
- ) ;
5936
-
5937
- const { manifest } = await getMockSnapFilesWithUpdatedChecksum ( {
5938
- manifest : getSnapManifest ( {
5939
- initialPermissions : {
5940
- 'endowment:page-home' : { } ,
5941
- 'endowment:ethereum-provider' : { } ,
5942
- } ,
5943
- } ) ,
5944
- } ) ;
5945
-
5946
- const snapController = getSnapController (
5947
- getSnapControllerOptions ( {
5948
- messenger,
5949
- detectSnapLocation : loopbackDetect ( { manifest } ) ,
5950
- featureFlags : {
5951
- useCaip25Permission : false ,
5952
- } ,
5953
- } ) ,
5954
- ) ;
5955
-
5956
- await snapController . installSnaps ( MOCK_ORIGIN , {
5957
- [ MOCK_SNAP_ID ] : { } ,
5958
- } ) ;
5959
-
5960
- const approvedPermissions = {
5961
- 'endowment:page-home' : {
5962
- caveats : null ,
5963
- } ,
5964
- 'endowment:ethereum-provider' : { } ,
5965
- } ;
5966
-
5967
- expect ( messenger . call ) . toHaveBeenCalledWith (
5968
- 'PermissionController:grantPermissions' ,
5969
- {
5970
- approvedPermissions,
5971
- subject : { origin : MOCK_SNAP_ID } ,
5972
- requestData : expect . any ( Object ) ,
5973
- } ,
5974
- ) ;
5975
-
5976
- snapController . destroy ( ) ;
5977
- } ) ;
5978
-
5979
5908
it ( 'does not grant the `endowment:caip25` permission if the Snap does not have the `endowment:ethereum-provider` permission' , async ( ) => {
5980
5909
const rootMessenger = getControllerMessenger ( ) ;
5981
5910
const messenger = getSnapControllerMessenger ( rootMessenger ) ;
@@ -6011,9 +5940,6 @@ describe('SnapController', () => {
6011
5940
getSnapControllerOptions ( {
6012
5941
messenger,
6013
5942
detectSnapLocation : loopbackDetect ( { manifest } ) ,
6014
- featureFlags : {
6015
- useCaip25Permission : true ,
6016
- } ,
6017
5943
} ) ,
6018
5944
) ;
6019
5945
0 commit comments