mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-03-21 22:33:10 +00:00
chore: treeIndex to be a string
This commit is contained in:
parent
0c9ac61ae7
commit
38f6b9c215
@ -470,7 +470,7 @@ export class RLNContract {
|
||||
|
||||
const network = await this.contract.provider.getNetwork();
|
||||
const address = this.contract.address;
|
||||
const membershipId = Number(decodedData.index);
|
||||
const membershipId = decodedData.index.toString();
|
||||
|
||||
return {
|
||||
identity,
|
||||
@ -596,7 +596,7 @@ export class RLNContract {
|
||||
|
||||
const network = await this.contract.provider.getNetwork();
|
||||
const address = this.contract.address;
|
||||
const membershipId = ethers.BigNumber.from(decodedData.index).toNumber();
|
||||
const membershipId = decodedData.index.toString();
|
||||
|
||||
return {
|
||||
identity,
|
||||
|
||||
@ -389,7 +389,7 @@ export class RLNLightContract {
|
||||
|
||||
const network = await this.contract.provider.getNetwork();
|
||||
const address = this.contract.address;
|
||||
const membershipId = Number(decodedData.index);
|
||||
const membershipId = decodedData.index.toString();
|
||||
|
||||
return {
|
||||
identity,
|
||||
@ -520,7 +520,7 @@ export class RLNLightContract {
|
||||
|
||||
const network = await this.contract.provider.getNetwork();
|
||||
const address = this.contract.address;
|
||||
const membershipId = Number(decodedData.index);
|
||||
const membershipId = decodedData.index.toString();
|
||||
|
||||
return {
|
||||
identity,
|
||||
|
||||
@ -10,7 +10,7 @@ export type Password = string | Uint8Array;
|
||||
export type MembershipInfo = {
|
||||
chainId: string;
|
||||
address: string;
|
||||
treeIndex: number;
|
||||
treeIndex: string;
|
||||
rateLimit: number;
|
||||
};
|
||||
|
||||
|
||||
@ -288,7 +288,7 @@ export class RLNInstance {
|
||||
return createRLNEncoder({
|
||||
encoder: createEncoder(options),
|
||||
rlnInstance: this,
|
||||
index: credentials.membership.treeIndex,
|
||||
index: parseInt(credentials.membership.treeIndex),
|
||||
credential: credentials.identity
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user