kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
KeygenStep: log the user in
rodzic
ab0f9b0a43
commit
ddee1d9d4e
|
@ -3,6 +3,7 @@ import React, { useEffect, useMemo, useState } from 'react';
|
||||||
import { FormattedMessage } from 'react-intl';
|
import { FormattedMessage } from 'react-intl';
|
||||||
|
|
||||||
import { fetchAccount } from 'soapbox/actions/accounts';
|
import { fetchAccount } from 'soapbox/actions/accounts';
|
||||||
|
import { logInNostr } from 'soapbox/actions/nostr';
|
||||||
import CopyableInput from 'soapbox/components/copyable-input';
|
import CopyableInput from 'soapbox/components/copyable-input';
|
||||||
import EmojiGraphic from 'soapbox/components/emoji-graphic';
|
import EmojiGraphic from 'soapbox/components/emoji-graphic';
|
||||||
import { Button, Stack, Modal, FormGroup, Text, Tooltip } from 'soapbox/components/ui';
|
import { Button, Stack, Modal, FormGroup, Text, Tooltip } from 'soapbox/components/ui';
|
||||||
|
@ -39,9 +40,11 @@ const KeygenStep: React.FC<IKeygenStep> = ({ onClose }) => {
|
||||||
|
|
||||||
const handleCopy = () => setDownloaded(true);
|
const handleCopy = () => setDownloaded(true);
|
||||||
|
|
||||||
const handleNext = () => {
|
const handleNext = async () => {
|
||||||
NKeys.add(secretKey);
|
const signer = NKeys.add(secretKey);
|
||||||
// TODO: log in, close modal
|
const pubkey = await signer.getPublicKey();
|
||||||
|
dispatch(logInNostr(pubkey));
|
||||||
|
onClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Ładowanie…
Reference in New Issue