WASM: PoW
This commit is contained in:
@ -1,6 +1,5 @@
|
||||
import useLogin from "Hooks/useLogin";
|
||||
import { LoginStore, createPublisher, sessionNeedsPin } from "Login";
|
||||
import { DefaultPowWorker } from "index";
|
||||
|
||||
export default function useEventPublisher() {
|
||||
const login = useLogin();
|
||||
@ -10,12 +9,8 @@ export default function useEventPublisher() {
|
||||
if (login.publicKey && !existing && !sessionNeedsPin(login)) {
|
||||
existing = createPublisher(login);
|
||||
if (existing) {
|
||||
if (login.preferences.pow) {
|
||||
existing.pow(login.preferences.pow, DefaultPowWorker);
|
||||
}
|
||||
LoginStore.setPublisher(login.id, existing);
|
||||
}
|
||||
}
|
||||
|
||||
return existing;
|
||||
}
|
||||
|
Reference in New Issue
Block a user