diff options
author | Sebastian <sebasjm@gmail.com> | 2023-12-08 12:57:28 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-12-08 12:57:28 -0300 |
commit | be741548a5c9325164bccc90056d490e85842e69 (patch) | |
tree | 13df131a95e3b08be39e0a4f5c6a555d57518ed7 /packages/demobank-ui/src/pages/WireTransfer.tsx | |
parent | 13f397521c0bb2b1587fa287de5be49c74f69d12 (diff) | |
download | wallet-core-be741548a5c9325164bccc90056d490e85842e69.tar.xz |
error handling
Diffstat (limited to 'packages/demobank-ui/src/pages/WireTransfer.tsx')
-rw-r--r-- | packages/demobank-ui/src/pages/WireTransfer.tsx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/packages/demobank-ui/src/pages/WireTransfer.tsx b/packages/demobank-ui/src/pages/WireTransfer.tsx index 88bdc70a6..7648df482 100644 --- a/packages/demobank-ui/src/pages/WireTransfer.tsx +++ b/packages/demobank-ui/src/pages/WireTransfer.tsx @@ -1,14 +1,12 @@ import { Amounts, TalerError } from "@gnu-taler/taler-util"; -import { notifyInfo, useTranslationContext } from "@gnu-taler/web-util/browser"; +import { Loading, notifyInfo, useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; -import { ErrorLoading } from "@gnu-taler/web-util/browser"; -import { Loading } from "@gnu-taler/web-util/browser"; +import { ErrorLoadingWithDebug } from "../components/ErrorLoadingWithDebug.js"; import { useAccountDetails } from "../hooks/access.js"; -import { assertUnreachable } from "./WithdrawalOperationPage.js"; +import { useBackendState } from "../hooks/backend.js"; import { LoginForm } from "./LoginForm.js"; import { PaytoWireTransferForm } from "./PaytoWireTransferForm.js"; -import { useBackendState } from "../hooks/backend.js"; -import { ErrorLoadingWithDebug } from "../components/ErrorLoadingWithDebug.js"; +import { assertUnreachable } from "./WithdrawalOperationPage.js"; export function WireTransfer({ toAccount, onRegister, onCancel, onSuccess }: { onSuccess?: () => void; toAccount?: string, onCancel?: () => void, onRegister?: () => void }): VNode { const { i18n } = useTranslationContext(); @@ -24,7 +22,7 @@ export function WireTransfer({ toAccount, onRegister, onCancel, onSuccess }: { o } if (result.type === "fail") { switch (result.case) { - case "unauthorized": return <LoginForm currentUser={account}/> + case "unauthorized": return <LoginForm currentUser={account} /> case "not-found": return <LoginForm currentUser={account} /> default: assertUnreachable(result) } |