Latest membership ID on contract
-
- {lastMembershipID === -1 ? "Not loaded yet" : lastMembershipID}
-
+ {lastMembershipID || "Not loaded yet"}
);
diff --git a/examples/rln-js/src/app/home/components/Keystore.tsx b/examples/rln-js/src/app/home/components/Keystore.tsx
index 5463c3f..a82dc65 100644
--- a/examples/rln-js/src/app/home/components/Keystore.tsx
+++ b/examples/rln-js/src/app/home/components/Keystore.tsx
@@ -1,13 +1,13 @@
import React from "react";
import { Block, BlockTypes } from "@/components/Block";
import { Button } from "@/components/Button";
-import { Status } from "@/components/Status";
import { Subtitle } from "@/components/Subtitle";
import { useStore, useWallet } from "@/hooks";
export const Keystore: React.FunctionComponent<{}> = () => {
- const { keystoreStatus, keystoreCredentials } = useStore();
- const { onGenerateCredentials } = useWallet();
+ const { keystorePassword, setKeystorePassword, keystoreCredentials } =
+ useStore();
+ const { onGenerateCredentials, onRegisterCredentials } = useWallet();
const credentialsNodes = React.useMemo(
() =>
@@ -19,6 +19,13 @@ export const Keystore: React.FunctionComponent<{}> = () => {
[keystoreCredentials]
);
+ const onPasswordChanged = React.useCallback(
+ (event: React.FormEvent