diff --git a/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts b/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts index 44639a3657a..fb183e46dbe 100644 --- a/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts +++ b/compiler/integration-tests/test/integration/browser/compile_prove_verify.test.ts @@ -3,7 +3,7 @@ import { TEST_LOG_LEVEL } from '../../environment.js'; import { Logger } from 'tslog'; import { initializeResolver } from '@noir-lang/source-resolver'; import newCompiler, { compile, init_log_level as compilerLogLevel } from '@noir-lang/noir_wasm'; -import { acvm, abi, Noir } from '@noir-lang/noir_js'; +import { Noir } from '@noir-lang/noir_js'; import { BarretenbergBackend } from '@noir-lang/backend_barretenberg'; import { ethers } from 'ethers'; import * as TOML from 'smol-toml'; @@ -11,12 +11,7 @@ import * as TOML from 'smol-toml'; const provider = new ethers.JsonRpcProvider('http://localhost:8545'); const logger = new Logger({ name: 'test', minLevel: TEST_LOG_LEVEL }); -const { default: initACVM } = acvm; -const { default: newABICoder } = abi; - await newCompiler(); -await newABICoder(); -await initACVM(); compilerLogLevel('INFO'); diff --git a/tooling/noir_js/src/program.ts b/tooling/noir_js/src/program.ts index 78a7df97294..01ca8b2f675 100644 --- a/tooling/noir_js/src/program.ts +++ b/tooling/noir_js/src/program.ts @@ -21,6 +21,7 @@ export class Noir { // Initial inputs to your program async generateFinalProof(inputs: any): Promise { + await this.init(); const serializedWitness = await generateWitness(this.circuit, inputs); return this.backend.generateFinalProof(serializedWitness); }