From b0684dab8a92dbe34b2d893a4dde75afbfffff11 Mon Sep 17 00:00:00 2001 From: weboko Date: Wed, 19 Apr 2023 20:32:43 +0200 Subject: [PATCH] make better naming --- src/rln_contract.spec.ts | 2 +- src/rln_contract.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rln_contract.spec.ts b/src/rln_contract.spec.ts index d8c5d43..c6159e9 100644 --- a/src/rln_contract.spec.ts +++ b/src/rln_contract.spec.ts @@ -46,7 +46,7 @@ describe("RLN Contract abstraction", () => { } as unknown as ethers.Contract; const contractSpy = chai.spy.on(rlnContract["_contract"], "register"); - await rlnContract.registerMember(rlnInstance, mockSignature); + await rlnContract.registerWithSignature(rlnInstance, mockSignature); chai.expect(contractSpy).to.have.been.called(); }); diff --git a/src/rln_contract.ts b/src/rln_contract.ts index 4d86267..b1b8f62 100644 --- a/src/rln_contract.ts +++ b/src/rln_contract.ts @@ -84,7 +84,7 @@ export class RLNContract { rlnInstance.insertMember(idCommitment); } - public async registerMember( + public async registerWithSignature( rlnInstance: RLNInstance, signature: string ): Promise { @@ -92,10 +92,10 @@ export class RLNContract { signature ); - return this.registerMemberFromMembershipKey(membershipKey); + return this.registerWithKey(membershipKey); } - public async registerMemberFromMembershipKey( + public async registerWithKey( membershipKey: MembershipKey ): Promise { const depositValue = await this.contract.MEMBERSHIP_DEPOSIT();