diff options
Diffstat (limited to 'packages/bank-ui/src/pages/PaymentOptions.tsx')
-rw-r--r-- | packages/bank-ui/src/pages/PaymentOptions.tsx | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/packages/bank-ui/src/pages/PaymentOptions.tsx b/packages/bank-ui/src/pages/PaymentOptions.tsx index 07dd18931..a034392d2 100644 --- a/packages/bank-ui/src/pages/PaymentOptions.tsx +++ b/packages/bank-ui/src/pages/PaymentOptions.tsx @@ -15,15 +15,15 @@ */ import { AmountJson, TalerError } from "@gnu-taler/taler-util"; +import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { Fragment, VNode, h } from "preact"; +import { useEffect } from "preact/hooks"; +import { useWithdrawalDetails } from "../hooks/account.js"; import { useBankState } from "../hooks/bank-state.js"; +import { useSessionState } from "../hooks/session.js"; +import { RouteDefinition } from "../route.js"; import { PaytoWireTransferForm } from "./PaytoWireTransferForm.js"; import { WalletWithdrawForm } from "./WalletWithdrawForm.js"; -import { EmptyObject, RouteDefinition } from "../route.js"; -import { useTranslationContext } from "@gnu-taler/web-util/browser"; -import { useWithdrawalDetails } from "../hooks/account.js"; -import { useEffect } from "preact/hooks"; -import { useSessionState } from "../hooks/session.js"; function ShowOperationPendingTag({ woid, @@ -35,14 +35,15 @@ function ShowOperationPendingTag({ const { i18n } = useTranslationContext(); const { state: credentials } = useSessionState(); const result = useWithdrawalDetails(woid); - const loading = !result + const loading = !result; const error = !loading && (result instanceof TalerError || result.type === "fail"); const pending = - !loading && !error && - (result.body.status === "pending" || result.body.status === "selected") - && credentials.status === "loggedIn" - && credentials.username === result.body.username; + !loading && + !error && + (result.body.status === "pending" || result.body.status === "selected") && + credentials.status === "loggedIn" && + credentials.username === result.body.username; useEffect(() => { if (!loading && !pending && onOperationAlreadyCompleted) { onOperationAlreadyCompleted(); @@ -96,9 +97,9 @@ export function PaymentOptions({ routeCashout: RouteDefinition; routeChargeWallet: RouteDefinition; routeWireTransfer: RouteDefinition<{ - account?: string, - subject?: string, - amount?: string, + account?: string; + subject?: string; + amount?: string; }>; }): VNode { const { i18n } = useTranslationContext(); @@ -126,9 +127,7 @@ export function PaymentOptions({ <span class="flex"> <div class="text-4xl mr-4 my-auto">💵</div> <span class="grow self-center text-lg text-gray-900 align-middle text-center"> - <i18n.Translate> - to a Taler wallet - </i18n.Translate> + <i18n.Translate>to a Taler wallet</i18n.Translate> </span> <svg class="self-center flex-none h-5 w-5 text-indigo-600" |