aboutsummaryrefslogtreecommitdiff
path: root/packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-06-05 10:04:09 -0300
committerSebastian <sebasjm@gmail.com>2023-06-05 10:04:09 -0300
commitc680f5aa71b08e978444df07f93c381f9d47ab82 (patch)
tree81903fac003bb1e202cf69551e06ba41a6e960a5 /packages/exchange-backoffice-ui/src/pages/HandleAccountNotReady.tsx
parentdf53866e6b148ea5fd2ab57e906a4aa36b535ed3 (diff)
rename aml
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}`);
-}