Merge branch 'main' into new-ui

This commit is contained in:
Alejandro Gomez
2023-01-28 22:43:56 +01:00
57 changed files with 900 additions and 261 deletions

View File

@ -4,7 +4,7 @@ import { useNavigate } from "react-router-dom";
import * as secp from '@noble/secp256k1';
import { RootState } from "State/Store";
import { setPrivateKey, setPublicKey } from "State/Login";
import { setPrivateKey, setPublicKey, setRelays } from "State/Login";
import { EmailRegex } from "Const";
import { bech32ToHex } from "Util";
import { HexKey } from "Nostr";
@ -73,6 +73,14 @@ export default function LoginPage() {
async function doNip07Login() {
let pubKey = await window.nostr.getPublicKey();
dispatch(setPublicKey(pubKey));
if ("getRelays" in window.nostr) {
let relays = await window.nostr.getRelays();
dispatch(setRelays({
relays: relays,
createdAt: 1
}));
}
}
function altLogins() {