diff options
author | Sebastian <sebasjm@gmail.com> | 2023-11-16 15:38:27 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-11-16 18:10:53 -0300 |
commit | 860e4216cdaf3e3bfb50ec1d9d285d34b6af5470 (patch) | |
tree | af1d393bfdf6bc36acf480165f3c0f6461accc7c /packages/aml-backoffice-ui/src/pages/HandleAccountNotReady.tsx | |
parent | 0ac2ddf4cb91af8e158af1f645ea50583f61b57d (diff) | |
download | wallet-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.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) } |