From 5e19700f409b81e0810494b35a5a24102a9ecb57 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Thu, 27 Mar 2025 11:10:12 +0530 Subject: [PATCH] fix: returns for ratelimit --- packages/rln/src/contract/rln_light_contract.ts | 6 ++++-- packages/rln/src/rln_light.ts | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/rln/src/contract/rln_light_contract.ts b/packages/rln/src/contract/rln_light_contract.ts index 5a378aa07d..db0ccdb65c 100644 --- a/packages/rln/src/contract/rln_light_contract.ts +++ b/packages/rln/src/contract/rln_light_contract.ts @@ -394,7 +394,8 @@ export class RLNLightContract { membership: { address, treeIndex: membershipId, - chainId: network.chainId + chainId: network.chainId, + rateLimit: decodedData.membershipRateLimit.toNumber() } }; } catch (error) { @@ -519,7 +520,8 @@ export class RLNLightContract { membership: { address, treeIndex: membershipId, - chainId: network.chainId + chainId: network.chainId, + rateLimit: decodedData.membershipRateLimit.toNumber() } }; } catch (error) { diff --git a/packages/rln/src/rln_light.ts b/packages/rln/src/rln_light.ts index 20dabcb13e..1c2fde41be 100644 --- a/packages/rln/src/rln_light.ts +++ b/packages/rln/src/rln_light.ts @@ -3,7 +3,7 @@ import { sha256 } from "@noble/hashes/sha256"; import { Logger } from "@waku/utils"; import { ethers } from "ethers"; -import { SEPOLIA_CONTRACT } from "./contract/constants.js"; +import { LINEA_CONTRACT } from "./contract/constants.js"; import { RLNLightContract } from "./contract/rln_light_contract.js"; import { IdentityCredential } from "./identity.js"; import { Keystore } from "./keystore/index.js"; @@ -120,10 +120,10 @@ export class RLNLightInstance { const address = credentials?.membership.address || options.address || - SEPOLIA_CONTRACT.address; + LINEA_CONTRACT.address; - if (address === SEPOLIA_CONTRACT.address) { - chainId = SEPOLIA_CONTRACT.chainId; + if (address === LINEA_CONTRACT.address) { + chainId = LINEA_CONTRACT.chainId; } const signer = options.signer || (await extractMetaMaskSigner());