From 54e2293f7e81d19ecee472f83c7be64a44c52c43 Mon Sep 17 00:00:00 2001 From: mhchia Date: Fri, 22 Sep 2023 15:54:29 +0800 Subject: [PATCH] fix: add trailing comma and remove unused --- src/registry.ts | 1 - src/rln.ts | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/registry.ts b/src/registry.ts index 45ff97b..9f47887 100644 --- a/src/registry.ts +++ b/src/registry.ts @@ -3,7 +3,6 @@ import { MerkleProof } from './types' import { DEFAULT_MERKLE_TREE_DEPTH, calculateIdentityCommitment, calculateRateCommitment } from './common' import { RLNContract } from './contract-wrapper' import { ethers } from 'ethers' -import poseidon from 'poseidon-lite' import { WithdrawProver } from './circuit-wrapper' export interface IRLNRegistry { diff --git a/src/rln.ts b/src/rln.ts index 548ca6c..f73a79e 100644 --- a/src/rln.ts +++ b/src/rln.ts @@ -469,11 +469,11 @@ export class RLN implements IRLN { if (await this.isRegistered() === false) { await this.registry.register(this.identityCommitment, userMessageLimit) console.debug( - `User has registered: this.identityCommitment=${this.identityCommitment}, userMessageLimit=${userMessageLimit}` + `User has registered: this.identityCommitment=${this.identityCommitment}, userMessageLimit=${userMessageLimit}`, ) } else { console.debug( - `User has already registered before. Skip registration: this.identityCommitment=${this.identityCommitment}` + `User has already registered before. Skip registration: this.identityCommitment=${this.identityCommitment}`, ) } await this.setMessageIDCounter(messageIDCounter) @@ -527,7 +527,7 @@ export class RLN implements IRLN { console.warn( 'MessageIDCounter is not initialized but user has registered. Maybe the user has restarted the app? ' + 'A new counter is created automatically. If a counter has been persisted, consider setting it with ' + - 'with `setMessageIDCounter`. Otherwise, it is possible for user to reuse the same message id.' + 'with `setMessageIDCounter`. Otherwise, it is possible for user to reuse the same message id.', ) } // Safely cast `this.messageIDCounter` to `IMessageIDCounter` since it must have been set.