aboutsummaryrefslogtreecommitdiff
path: root/packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx')
-rw-r--r--packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx34
1 files changed, 0 insertions, 34 deletions
diff --git a/packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx b/packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx
deleted file mode 100644
index 05fd0a019..000000000
--- a/packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { VNode, h } from "preact";
-import { OfficerNotReady } from "../hooks/useOfficer.js";
-import { CreateAccount } from "./CreateAccount.js";
-import { UnlockAccount } from "./UnlockAccount.js";
-
-export function HandleAccountNotReady({
- officer,
-}: {
- officer: OfficerNotReady;
-}): VNode {
- if (officer.state === "not-found") {
- return (
- <CreateAccount
- onNewAccount={(password) => {
- officer.create(password);
- }}
- />
- );
- }
-
- if (officer.state === "locked") {
- return (
- <UnlockAccount
- onRemoveAccount={() => {
- officer.forget();
- }}
- onAccountUnlocked={(pwd) => {
- officer.tryUnlock(pwd);
- }}
- />
- );
- }
- throw Error(`unexpected account state ${(officer as any).state}`);
-}