aboutsummaryrefslogtreecommitdiff
path: root/packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-11-16 15:38:27 -0300
committerSebastian <sebasjm@gmail.com>2023-11-16 18:10:53 -0300
commit860e4216cdaf3e3bfb50ec1d9d285d34b6af5470 (patch)
treeaf1d393bfdf6bc36acf480165f3c0f6461accc7c /packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx
parent0ac2ddf4cb91af8e158af1f645ea50583f61b57d (diff)
downloadwallet-core-860e4216cdaf3e3bfb50ec1d9d285d34b6af5470.tar.xz
some fixes and examples
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx')
-rw-r--r--packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx b/packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx
index b3d04d97e..ff800ebdc 100644
--- a/packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx
+++ b/packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx
@@ -2,6 +2,7 @@ import { VNode, h } from "preact";
import { OfficerNotReady } from "../hooks/useOfficer.js";
import { CreateAccount } from "./CreateAccount.js";
import { UnlockAccount } from "./UnlockAccount.js";
+import { assertUnreachable } from "@gnu-taler/taler-util";
export function HandleAccountNotReady({
officer,
@@ -24,14 +25,11 @@ export function HandleAccountNotReady({
onRemoveAccount={() => {
officer.forget();
}}
- onAccountUnlocked={(pwd) => {
- officer.tryUnlock(pwd);
+ onAccountUnlocked={async (pwd) => {
+ await officer.tryUnlock(pwd);
}}
/>
);
}
- return <div>
- some
- </div>
- throw Error(`unexpected account state ${(officer as any).state}`);
+ assertUnreachable(officer)
}