diff --git a/packages/permission-controller/src/PermissionController.test.ts b/packages/permission-controller/src/PermissionController.test.ts index 0e179d11a16..93efc8ffdfe 100644 --- a/packages/permission-controller/src/PermissionController.test.ts +++ b/packages/permission-controller/src/PermissionController.test.ts @@ -5288,7 +5288,11 @@ describe('PermissionController', () => { }; const expectedError = errors.unauthorized({ - data: { origin, method: PermissionNames.wallet_getSecretArray }, + data: { + origin, + method: PermissionNames.wallet_getSecretArray, + cause: null, + }, }); const { error }: any = await engine.handle(request); @@ -5308,7 +5312,10 @@ describe('PermissionController', () => { method: 'wallet_foo', }; - const expectedError = errors.methodNotFound('wallet_foo', { origin }); + const expectedError = errors.methodNotFound('wallet_foo', { + origin, + cause: null, + }); const { error }: any = await engine.handle(request); expect(error).toMatchObject(expect.objectContaining(expectedError)); @@ -5348,7 +5355,7 @@ describe('PermissionController', () => { const expectedError = errors.internalError( `Request for method "${PermissionNames.wallet_doubleNumber}" returned undefined result.`, - { request: { ...request } }, + { request: { ...request }, cause: null }, ); const { error }: any = await engine.handle(request);