@@ -5990,7 +5990,7 @@ describe('SnapController', () => {
59905990 snapController . destroy ( ) ;
59915991 } ) ;
59925992
5993- it ( 'grants the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is enabled ' , async ( ) => {
5993+ it ( 'grants the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider`' , async ( ) => {
59945994 const rootMessenger = getControllerMessenger ( ) ;
59955995 const messenger = getSnapControllerMessenger ( rootMessenger ) ;
59965996
@@ -6026,9 +6026,6 @@ describe('SnapController', () => {
60266026 getSnapControllerOptions ( {
60276027 messenger,
60286028 detectSnapLocation : loopbackDetect ( { manifest } ) ,
6029- featureFlags : {
6030- useCaip25Permission : true ,
6031- } ,
60326029 } ) ,
60336030 ) ;
60346031
@@ -6072,7 +6069,7 @@ describe('SnapController', () => {
60726069 snapController . destroy ( ) ;
60736070 } ) ;
60746071
6075- it ( 'grants the `endowment:caip25` permission when updating a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is enabled ' , async ( ) => {
6072+ it ( 'grants the `endowment:caip25` permission when updating a Snap with `endowment:ethereum-provider`' , async ( ) => {
60766073 const newVersion = '1.0.2' ;
60776074 const newVersionRange = '>=1.0.1' ;
60786075
@@ -6132,9 +6129,6 @@ describe('SnapController', () => {
61326129 getSnapControllerOptions ( {
61336130 messenger,
61346131 detectSnapLocation : detectLocationMock ,
6135- featureFlags : {
6136- useCaip25Permission : true ,
6137- } ,
61386132 } ) ,
61396133 ) ;
61406134
@@ -6205,71 +6199,6 @@ describe('SnapController', () => {
62056199 controller . destroy ( ) ;
62066200 } ) ;
62076201
6208- it ( 'does not grant the `endowment:caip25` permission to a Snap with `endowment:ethereum-provider` if the `useCaip25Permission` feature flag is disabled' , async ( ) => {
6209- const rootMessenger = getControllerMessenger ( ) ;
6210- const messenger = getSnapControllerMessenger ( rootMessenger ) ;
6211-
6212- rootMessenger . registerActionHandler (
6213- 'PermissionController:getPermissions' ,
6214- ( ) => ( { } ) ,
6215- ) ;
6216-
6217- rootMessenger . registerActionHandler (
6218- 'SelectedNetworkController:getNetworkClientIdForDomain' ,
6219- ( ) => 'mainnet' ,
6220- ) ;
6221-
6222- rootMessenger . registerActionHandler (
6223- 'NetworkController:getNetworkClientById' ,
6224- ( ) => ( {
6225- configuration : {
6226- chainId : '0x1' ,
6227- } ,
6228- } ) ,
6229- ) ;
6230-
6231- const { manifest } = await getMockSnapFilesWithUpdatedChecksum ( {
6232- manifest : getSnapManifest ( {
6233- initialPermissions : {
6234- 'endowment:page-home' : { } ,
6235- 'endowment:ethereum-provider' : { } ,
6236- } ,
6237- } ) ,
6238- } ) ;
6239-
6240- const snapController = getSnapController (
6241- getSnapControllerOptions ( {
6242- messenger,
6243- detectSnapLocation : loopbackDetect ( { manifest } ) ,
6244- featureFlags : {
6245- useCaip25Permission : false ,
6246- } ,
6247- } ) ,
6248- ) ;
6249-
6250- await snapController . installSnaps ( MOCK_ORIGIN , {
6251- [ MOCK_SNAP_ID ] : { } ,
6252- } ) ;
6253-
6254- const approvedPermissions = {
6255- 'endowment:page-home' : {
6256- caveats : null ,
6257- } ,
6258- 'endowment:ethereum-provider' : { } ,
6259- } ;
6260-
6261- expect ( messenger . call ) . toHaveBeenCalledWith (
6262- 'PermissionController:grantPermissions' ,
6263- {
6264- approvedPermissions,
6265- subject : { origin : MOCK_SNAP_ID } ,
6266- requestData : expect . any ( Object ) ,
6267- } ,
6268- ) ;
6269-
6270- snapController . destroy ( ) ;
6271- } ) ;
6272-
62736202 it ( 'does not grant the `endowment:caip25` permission if the Snap does not have the `endowment:ethereum-provider` permission' , async ( ) => {
62746203 const rootMessenger = getControllerMessenger ( ) ;
62756204 const messenger = getSnapControllerMessenger ( rootMessenger ) ;
@@ -6305,9 +6234,6 @@ describe('SnapController', () => {
63056234 getSnapControllerOptions ( {
63066235 messenger,
63076236 detectSnapLocation : loopbackDetect ( { manifest } ) ,
6308- featureFlags : {
6309- useCaip25Permission : true ,
6310- } ,
63116237 } ) ,
63126238 ) ;
63136239
0 commit comments