From f9152f24b06118d3465a4655a8fa1a67e0ee7a70 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Tue, 29 Jun 2021 11:52:48 +1000 Subject: [PATCH] Move key handling modules to common dir --- examples/eth-dm/src/App.tsx | 4 ++-- examples/eth-dm/src/{ => key_handling}/LoadKeyFromStorage.tsx | 4 ++-- examples/eth-dm/src/{ => key_handling}/SaveKeyToStorage.tsx | 4 ++-- .../eth-dm/src/{keyStorage.ts => key_handling/key_storage.ts} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename examples/eth-dm/src/{ => key_handling}/LoadKeyFromStorage.tsx (93%) rename examples/eth-dm/src/{ => key_handling}/SaveKeyToStorage.tsx (92%) rename examples/eth-dm/src/{keyStorage.ts => key_handling/key_storage.ts} (98%) diff --git a/examples/eth-dm/src/App.tsx b/examples/eth-dm/src/App.tsx index 011b7d01e0..222586520f 100644 --- a/examples/eth-dm/src/App.tsx +++ b/examples/eth-dm/src/App.tsx @@ -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 './SaveKeyToStorage'; -import { LoadKeyFromStorage } from './LoadKeyFromStorage'; +import { SaveKeyToStorage } from './key_handling/SaveKeyToStorage'; +import { LoadKeyFromStorage } from './key_handling/LoadKeyFromStorage'; export const PublicKeyContentTopic = '/eth-dm/1/public-key/json'; export const DirectMessageContentTopic = '/eth-dm/1/direct-message/json'; diff --git a/examples/eth-dm/src/LoadKeyFromStorage.tsx b/examples/eth-dm/src/key_handling/LoadKeyFromStorage.tsx similarity index 93% rename from examples/eth-dm/src/LoadKeyFromStorage.tsx rename to examples/eth-dm/src/key_handling/LoadKeyFromStorage.tsx index 96d625eb0d..d3022b9377 100644 --- a/examples/eth-dm/src/LoadKeyFromStorage.tsx +++ b/examples/eth-dm/src/key_handling/LoadKeyFromStorage.tsx @@ -1,7 +1,7 @@ import { Button, TextField } from '@material-ui/core'; import React, { ChangeEvent, useState } from 'react'; -import { loadKeyPairFromStorage } from './keyStorage'; -import { KeyPair } from './crypto'; +import { loadKeyPairFromStorage } from './key_storage'; +import { KeyPair } from '../crypto'; export interface Props { setEthDmKeyPair: (keyPair: KeyPair) => void; diff --git a/examples/eth-dm/src/SaveKeyToStorage.tsx b/examples/eth-dm/src/key_handling/SaveKeyToStorage.tsx similarity index 92% rename from examples/eth-dm/src/SaveKeyToStorage.tsx rename to examples/eth-dm/src/key_handling/SaveKeyToStorage.tsx index eaaf4bbd90..e57287d1a9 100644 --- a/examples/eth-dm/src/SaveKeyToStorage.tsx +++ b/examples/eth-dm/src/key_handling/SaveKeyToStorage.tsx @@ -1,7 +1,7 @@ import { Button, TextField } from '@material-ui/core'; import React, { ChangeEvent, useState } from 'react'; -import { KeyPair } from './crypto'; -import { saveKeyPairToStorage } from './keyStorage'; +import { KeyPair } from '../crypto'; +import { saveKeyPairToStorage } from './key_storage'; export interface Props { ethDmKeyPair: KeyPair | undefined; diff --git a/examples/eth-dm/src/keyStorage.ts b/examples/eth-dm/src/key_handling/key_storage.ts similarity index 98% rename from examples/eth-dm/src/keyStorage.ts rename to examples/eth-dm/src/key_handling/key_storage.ts index 5ed46de9f5..d6fc7d2da6 100644 --- a/examples/eth-dm/src/keyStorage.ts +++ b/examples/eth-dm/src/key_handling/key_storage.ts @@ -1,4 +1,4 @@ -import { KeyPair } from './crypto'; +import { KeyPair } from '../crypto'; /** * Save keypair to storage, encrypted with password