diff --git a/packages/snaps-execution-environments/nyc.config.js b/packages/snaps-execution-environments/nyc.config.js index 1dd5e1808d..66d23e9fbe 100644 --- a/packages/snaps-execution-environments/nyc.config.js +++ b/packages/snaps-execution-environments/nyc.config.js @@ -4,7 +4,7 @@ module.exports = { 'check-coverage': true, branches: 89.81, - lines: 90.37, + lines: 90.38, functions: 94.31, - statements: 90.37, + statements: 90.38, }; diff --git a/packages/snaps-execution-environments/src/common/endowments/commonEndowmentFactory.ts b/packages/snaps-execution-environments/src/common/endowments/commonEndowmentFactory.ts index 9efb3849bb..e3d097d910 100644 --- a/packages/snaps-execution-environments/src/common/endowments/commonEndowmentFactory.ts +++ b/packages/snaps-execution-environments/src/common/endowments/commonEndowmentFactory.ts @@ -65,7 +65,9 @@ const buildCommonEndowments = (): EndowmentFactory[] => { names: [endowmentSpecification.name] as const, factory: () => { return { - [endowmentSpecification.name]: harden(endowmentSpecification), + [endowmentSpecification.name]: harden( + endowmentSpecification.endowment, + ), } as const; }, }; diff --git a/packages/snaps-execution-environments/src/common/endowments/index.test.ts b/packages/snaps-execution-environments/src/common/endowments/index.test.ts index a3211bc92e..922796d5f1 100644 --- a/packages/snaps-execution-environments/src/common/endowments/index.test.ts +++ b/packages/snaps-execution-environments/src/common/endowments/index.test.ts @@ -117,7 +117,7 @@ describe('Endowment utils', () => { expect(endowments).toMatchObject({ snap: mockSnapAPI, console, - Uint8Array: expect.any(Object), + Uint8Array: expect.any(Function), Math: expect.any(Object), setTimeout: expect.any(Function), clearTimeout: expect.any(Function), @@ -126,9 +126,9 @@ describe('Endowment utils', () => { expect(endowments.snap).toBe(mockSnapAPI); expect(endowments.console).toBe(console); + expect(endowments.Uint8Array).toBe(Uint8Array); + expect(endowments.WebAssembly).toBe(WebAssembly); - expect(endowments.Uint8Array).not.toBe(Uint8Array); - expect(endowments.WebAssembly).not.toBe(WebAssembly); expect(endowments.clearTimeout).not.toBe(clearTimeout); expect(endowments.setTimeout).not.toBe(setTimeout); expect(endowments.Math).not.toBe(Math);