fix: returns for ratelimit

This commit is contained in:
Danish Arora 2025-03-27 11:10:12 +05:30
parent eb555e95b5
commit 5e19700f40
No known key found for this signature in database
GPG Key ID: 1C6EF37CDAE1426E
2 changed files with 8 additions and 6 deletions

View File

@ -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) {

View File

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