diff --git a/src/rln_contract.spec.ts b/src/rln_contract.spec.ts index fd8cb33..4d95a8b 100644 --- a/src/rln_contract.spec.ts +++ b/src/rln_contract.spec.ts @@ -18,9 +18,8 @@ describe("RLN Contract abstraction", () => { provider: voidSigner, }); - chai.spy.on(rlnContract, "contract.queryFilter", () => - Promise.resolve([mockEvent()]) - ); + rlnContract["contract"]["queryFilter"] = () => + Promise.resolve([mockEvent()]); await rlnContract.fetchMembers(rlnInstance); @@ -38,9 +37,9 @@ describe("RLN Contract abstraction", () => { provider: voidSigner, }); - chai.spy.on(rlnContract, "contract.MEMBERSHIP_DEPOSIT", () => - Promise.resolve(1) - ); + (rlnContract["contract"] as any)["MEMBERSHIP_DEPOSIT"] = () => + Promise.resolve(1); + const contractSpy = chai.spy.on(rlnContract, "contract.register"); await rlnContract.registerMember(rlnInstance, mockSignature);