make better naming

This commit is contained in:
weboko 2023-04-19 20:32:43 +02:00
parent a93be8e797
commit b0684dab8a
No known key found for this signature in database
2 changed files with 4 additions and 4 deletions

View File

@ -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();
});

View File

@ -84,7 +84,7 @@ export class RLNContract {
rlnInstance.insertMember(idCommitment);
}
public async registerMember(
public async registerWithSignature(
rlnInstance: RLNInstance,
signature: string
): Promise<ethers.Event | undefined> {
@ -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<ethers.Event | undefined> {
const depositValue = await this.contract.MEMBERSHIP_DEPOSIT();