Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: fix access to the network #97

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/rln.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
* @returns RLNInstance
*/
export async function create(): Promise<RLNInstance> {
await (init as any)?.();

Check warning on line 69 in src/rln.ts

View workflow job for this annotation

GitHub Actions / check

Unexpected any. Specify a different type
zerokitRLN.init_panic_hook();
const witnessCalculator = await loadWitnessCalculator();
const zkey = await loadZkey();
Expand Down Expand Up @@ -243,7 +243,7 @@
}

this._credentials = credentials;
this._signer = signer!;

Check warning on line 246 in src/rln.ts

View workflow job for this annotation

GitHub Actions / check

Forbidden non-null assertion
this._contract = await RLNContract.init(this, {
registryAddress: registryAddress!,
signer: signer!,
Expand Down Expand Up @@ -381,7 +381,7 @@
}

const chainId = credentials.membership.chainId;
const network = await this._contract.registry.getNetwork();
const network = await this._contract.registry.provider.getNetwork();
const currentChainId = network.chainId;
if (chainId !== currentChainId) {
throw Error(
Expand Down
Loading