From 09de81374206308df033362733df4bd568edb9a8 Mon Sep 17 00:00:00 2001 From: "Justin R. Evans" Date: Fri, 4 Oct 2024 11:17:13 -0400 Subject: [PATCH] feat: setting up advanced options --- .../src/Setup/Common/AdvancedOptions.tsx | 45 +++++++++++ .../src/Setup/Common/AdvancedOptionsMenu.tsx | 18 +++++ .../src/Setup/Common/Bip39PassphraseForm.tsx | 42 ++++++++++ apps/extension/src/Setup/Common/Bip44Form.tsx | 7 +- apps/extension/src/Setup/Common/index.ts | 1 + .../Setup/ImportAccount/SeedPhraseImport.tsx | 78 ++++++------------- 6 files changed, 135 insertions(+), 56 deletions(-) create mode 100644 apps/extension/src/Setup/Common/AdvancedOptions.tsx create mode 100644 apps/extension/src/Setup/Common/AdvancedOptionsMenu.tsx create mode 100644 apps/extension/src/Setup/Common/Bip39PassphraseForm.tsx diff --git a/apps/extension/src/Setup/Common/AdvancedOptions.tsx b/apps/extension/src/Setup/Common/AdvancedOptions.tsx new file mode 100644 index 000000000..b6f78fe9a --- /dev/null +++ b/apps/extension/src/Setup/Common/AdvancedOptions.tsx @@ -0,0 +1,45 @@ +import { Bip44Path } from "@namada/types"; +import React, { useState } from "react"; +import { AdvancedOptionsMenu } from "./AdvancedOptionsMenu"; +import Bip39PassphraseForm from "./Bip39PassphraseForm"; +import Bip44Form from "./Bip44Form"; + +type Props = { + path: Bip44Path; + passphrase: string; + setPath: (path: Bip44Path) => void; + setPassphrase: (passphrase: string) => void; +}; + +export enum Option { + Menu = "menu", + Passphrase = "passphrase", + Path = "path", +} + +export const AdvancedOptions: React.FC = ({ + path, + passphrase, + setPath, + setPassphrase, +}) => { + const [view, setView] = useState