Use Key Pair terminology for eth-dm keypair

This commit is contained in:
Franck Royer 2021-06-29 11:56:49 +10:00
parent f9152f24b0
commit b677b0eb7b
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
4 changed files with 8 additions and 8 deletions

View File

@ -17,8 +17,8 @@ import { Message, Messages } from './Messages';
import 'fontsource-roboto';
import { Button } from '@material-ui/core';
import { SendMessage } from './SendMessage';
import { SaveKeyToStorage } from './key_handling/SaveKeyToStorage';
import { LoadKeyFromStorage } from './key_handling/LoadKeyFromStorage';
import { SaveKeyPair } from './key_pair_handling/SaveKeyPair';
import { LoadKeyPair } from './key_pair_handling/LoadKeyPair';
export const PublicKeyContentTopic = '/eth-dm/1/public-key/json';
export const DirectMessageContentTopic = '/eth-dm/1/direct-message/json';
@ -158,7 +158,7 @@ function App() {
flexWrap: 'wrap',
}}
>
<LoadKeyFromStorage
<LoadKeyPair
setEthDmKeyPair={(keyPair) => setEthDmKeyPair(keyPair)}
disabled={!!ethDmKeyPair}
/>
@ -170,7 +170,7 @@ function App() {
flexWrap: 'wrap',
}}
>
<SaveKeyToStorage ethDmKeyPair={ethDmKeyPair} />
<SaveKeyPair ethDmKeyPair={ethDmKeyPair} />
</div>
<div>
<Button

View File

@ -1,6 +1,6 @@
import { Button, TextField } from '@material-ui/core';
import React, { ChangeEvent, useState } from 'react';
import { loadKeyPairFromStorage } from './key_storage';
import { loadKeyPairFromStorage } from './key_pair_storage';
import { KeyPair } from '../crypto';
export interface Props {
@ -8,7 +8,7 @@ export interface Props {
disabled: boolean;
}
export function LoadKeyFromStorage(props: Props) {
export function LoadKeyPair(props: Props) {
const [password, setPassword] = useState<string>();
const disabled = props.disabled;

View File

@ -1,13 +1,13 @@
import { Button, TextField } from '@material-ui/core';
import React, { ChangeEvent, useState } from 'react';
import { KeyPair } from '../crypto';
import { saveKeyPairToStorage } from './key_storage';
import { saveKeyPairToStorage } from './key_pair_storage';
export interface Props {
ethDmKeyPair: KeyPair | undefined;
}
export function SaveKeyToStorage(props: Props) {
export function SaveKeyPair(props: Props) {
const [password, setPassword] = useState<string>();
const ethDmKeyPair = props.ethDmKeyPair;