diff --git a/yarn-project/simulator/src/client/private_execution.test.ts b/yarn-project/simulator/src/client/private_execution.test.ts index 02e3d6b9588..3f152e2e7bd 100644 --- a/yarn-project/simulator/src/client/private_execution.test.ts +++ b/yarn-project/simulator/src/client/private_execution.test.ts @@ -565,15 +565,6 @@ describe('Private Execution test suite', () => { describe('consuming messages', () => { const contractAddress = defaultContractAddress; - beforeEach(() => { - oracle.getCompleteAddress.mockImplementation((address: AztecAddress) => { - if (address.equals(recipient)) { - return Promise.resolve(recipientCompleteAddress); - } - throw new Error(`Unknown address ${address}`); - }); - }); - describe('L1 to L2', () => { const artifact = getFunctionArtifact(TestContractArtifact, 'consume_mint_private_message'); let bridgedAmount = 100n; @@ -875,15 +866,6 @@ describe('Private Execution test suite', () => { }); describe('pending note hashes contract', () => { - beforeEach(() => { - oracle.getCompleteAddress.mockImplementation((address: AztecAddress) => { - if (address.equals(owner)) { - return Promise.resolve(ownerCompleteAddress); - } - throw new Error(`Unknown address ${address}`); - }); - }); - beforeEach(() => { oracle.getFunctionArtifact.mockImplementation((_, selector) => Promise.resolve(getFunctionArtifact(PendingNoteHashesContractArtifact, selector)), @@ -1065,6 +1047,7 @@ describe('Private Execution test suite', () => { const args = [completeAddress.address]; const pubKey = completeAddress.masterIncomingViewingPublicKey; + oracle.getCompleteAddress.mockResolvedValue(completeAddress); const result = await runSimulator({ artifact, args }); expect(result.returnValues).toEqual([pubKey.x, pubKey.y]); });