mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-03-21 22:33:10 +00:00
chore: chainId to be a string
This commit is contained in:
parent
1e6e9092fa
commit
0c9ac61ae7
@ -1,7 +1,7 @@
|
||||
import { RLN_ABI } from "./abi.js";
|
||||
|
||||
export const LINEA_CONTRACT = {
|
||||
chainId: 59141,
|
||||
chainId: "59141",
|
||||
address: "0xb9cd878c90e49f797b4431fbf4fb333108cb90e6",
|
||||
abi: RLN_ABI
|
||||
};
|
||||
|
||||
@ -477,7 +477,7 @@ export class RLNContract {
|
||||
membership: {
|
||||
address,
|
||||
treeIndex: membershipId,
|
||||
chainId: network.chainId,
|
||||
chainId: network.chainId.toString(),
|
||||
rateLimit: decodedData.membershipRateLimit.toNumber()
|
||||
}
|
||||
};
|
||||
@ -603,7 +603,7 @@ export class RLNContract {
|
||||
membership: {
|
||||
address,
|
||||
treeIndex: membershipId,
|
||||
chainId: network.chainId,
|
||||
chainId: network.chainId.toString(),
|
||||
rateLimit: decodedData.membershipRateLimit.toNumber()
|
||||
}
|
||||
};
|
||||
|
||||
@ -396,7 +396,7 @@ export class RLNLightContract {
|
||||
membership: {
|
||||
address,
|
||||
treeIndex: membershipId,
|
||||
chainId: network.chainId,
|
||||
chainId: network.chainId.toString(),
|
||||
rateLimit: decodedData.membershipRateLimit.toNumber()
|
||||
}
|
||||
};
|
||||
@ -527,7 +527,7 @@ export class RLNLightContract {
|
||||
membership: {
|
||||
address,
|
||||
treeIndex: membershipId,
|
||||
chainId: network.chainId,
|
||||
chainId: network.chainId.toString(),
|
||||
rateLimit: decodedData.membershipRateLimit.toNumber()
|
||||
}
|
||||
};
|
||||
|
||||
@ -8,7 +8,7 @@ export type Password = string | Uint8Array;
|
||||
// see reference
|
||||
// https://github.com/waku-org/nwaku/blob/f05528d4be3d3c876a8b07f9bb7dfaae8aa8ec6e/waku/waku_keystore/protocol_types.nim#L111
|
||||
export type MembershipInfo = {
|
||||
chainId: number;
|
||||
chainId: string;
|
||||
address: string;
|
||||
treeIndex: number;
|
||||
rateLimit: number;
|
||||
|
||||
@ -197,7 +197,7 @@ export class RLNInstance {
|
||||
}
|
||||
|
||||
const signer = options.signer || (await extractMetaMaskSigner());
|
||||
const currentChainId = await signer.getChainId();
|
||||
const currentChainId = (await signer.getChainId()).toString();
|
||||
|
||||
if (chainId && chainId !== currentChainId) {
|
||||
throw Error(
|
||||
@ -312,7 +312,7 @@ export class RLNInstance {
|
||||
|
||||
const chainId = credentials.membership.chainId;
|
||||
const network = await this._contract.provider.getNetwork();
|
||||
const currentChainId = network.chainId;
|
||||
const currentChainId = network.chainId.toString();
|
||||
if (chainId !== currentChainId) {
|
||||
throw Error(
|
||||
`Failed to verify chain coordinates: credentials chainID=${chainId} is not equal to registryContract chainID=${currentChainId}`
|
||||
|
||||
@ -127,7 +127,7 @@ export class RLNLightInstance {
|
||||
}
|
||||
|
||||
const signer = options.signer || (await extractMetaMaskSigner());
|
||||
const currentChainId = await signer.getChainId();
|
||||
const currentChainId = (await signer.getChainId()).toString();
|
||||
|
||||
if (chainId && chainId !== currentChainId) {
|
||||
throw Error(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user