diff options
Diffstat (limited to 'packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx')
-rw-r--r-- | packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx | 10 |
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) } |