use latest @waku/rln

This commit is contained in:
Sasha 2023-04-28 01:30:14 +02:00
parent 094686962a
commit b59b1ad234
No known key found for this signature in database

View File

@ -12,7 +12,7 @@ import {
RLNDecoder, RLNDecoder,
RLNEncoder, RLNEncoder,
RLNContract, RLNContract,
} from "https://unpkg.com/@waku/rln@0.0.14/bundle/index.js"; } from "https://unpkg.com/@waku/rln@0.0.14-7e0966a/bundle/index.js";
import { ethers } from "https://unpkg.com/ethers@5.7.2/dist/ethers.esm.min.js"; import { ethers } from "https://unpkg.com/ethers@5.7.2/dist/ethers.esm.min.js";
const ContentTopic = "/toy-chat/2/luzhou/proto"; const ContentTopic = "/toy-chat/2/luzhou/proto";
@ -81,7 +81,7 @@ async function initRLN(ui) {
const filter = rlnContract.contract.filters.MemberRegistered(); const filter = rlnContract.contract.filters.MemberRegistered();
ui.disableRetrieveButton(); ui.disableRetrieveButton();
await rlnContract.fetchMembers(rlnInstance, rlnDeployBlk); await rlnContract.fetchMembers(rlnInstance, { fromBlock: rlnDeployBlk });
ui.enableRetrieveButton(); ui.enableRetrieveButton();
rlnContract.subscribeToMembers(rlnInstance); rlnContract.subscribeToMembers(rlnInstance);