From 3dd8758027e678f168c782c9ad55c82a90f49b52 Mon Sep 17 00:00:00 2001 From: weboko Date: Tue, 24 Jan 2023 00:25:33 +0100 Subject: [PATCH] use another approach for typecasting --- src/rln_contract.spec.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rln_contract.spec.ts b/src/rln_contract.spec.ts index 8d8187c..ffd97c2 100644 --- a/src/rln_contract.spec.ts +++ b/src/rln_contract.spec.ts @@ -18,9 +18,9 @@ describe("RLN Contract abstraction", () => { provider: voidSigner, }); - rlnContract["_contract" as any] = { + rlnContract["_contract"] = { queryFilter: () => Promise.resolve([mockEvent()]), - }; + } as unknown as ethers.Contract; chai.spy.on(rlnContract, "contract.queryFilter"); await rlnContract.fetchMembers(rlnInstance); @@ -39,9 +39,9 @@ describe("RLN Contract abstraction", () => { provider: voidSigner, }); - rlnContract["_contract" as any] = { + rlnContract["_contract"] = { MEMBERSHIP_DEPOSIT: () => Promise.resolve(1), - }; + } as unknown as ethers.Contract; chai.spy.on(rlnContract, "contract.MEMBERSHIP_DEPOSIT"); const contractSpy = chai.spy.on(rlnContract, "contract.register");