diff --git a/packages/rln/src/credentials_manager.ts b/packages/rln/src/credentials_manager.ts index 1cf0495d59..498f298830 100644 --- a/packages/rln/src/credentials_manager.ts +++ b/packages/rln/src/credentials_manager.ts @@ -187,7 +187,7 @@ export class RLNCredentialsManager { const currentChainId = await signer.getChainId(); log.info(`Current chain ID: ${currentChainId}`); - if (chainId && chainId !== currentChainId) { + if (chainId && chainId !== currentChainId.toString()) { log.error( `Chain ID mismatch: contract=${chainId}, current=${currentChainId}` ); @@ -260,7 +260,7 @@ export class RLNCredentialsManager { const chainId = credentials.membership.chainId; const network = await this.contract.provider.getNetwork(); const currentChainId = network.chainId; - if (chainId !== currentChainId) { + if (chainId !== currentChainId.toString()) { throw Error( `Failed to verify chain coordinates: credentials chainID=${chainId} is not equal to registryContract chainID=${currentChainId}` );