diff options
author | Sebastian <sebasjm@gmail.com> | 2024-02-23 09:27:03 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-02-23 09:27:23 -0300 |
commit | 5427327ffa99d40028a1058234c178850c465191 (patch) | |
tree | 1d0f2136949c896dba5e06ba35a0cd65e0b1071f /packages/demobank-ui/src | |
parent | 73e36c99037cef1ccc43bb80b67b19e0f44326fd (diff) |
fix #8504
Diffstat (limited to 'packages/demobank-ui/src')
-rw-r--r-- | packages/demobank-ui/src/pages/PaymentOptions.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/demobank-ui/src/pages/PaymentOptions.tsx b/packages/demobank-ui/src/pages/PaymentOptions.tsx index b13f7539f..095958afb 100644 --- a/packages/demobank-ui/src/pages/PaymentOptions.tsx +++ b/packages/demobank-ui/src/pages/PaymentOptions.tsx @@ -23,6 +23,7 @@ import { EmptyObject, RouteDefinition } from "../route.js"; import { useTranslationContext } from "@gnu-taler/web-util/browser"; import { useWithdrawalDetails } from "../hooks/access.js"; import { useEffect } from "preact/hooks"; +import { useBackendState } from "../hooks/backend.js"; function ShowOperationPendingTag({ woid, @@ -32,13 +33,16 @@ function ShowOperationPendingTag({ onOperationAlreadyCompleted?: () => void; }): VNode { const { i18n } = useTranslationContext(); + const { state: credentials } = useBackendState(); const result = useWithdrawalDetails(woid); const loading = !result const error = !loading && (result instanceof TalerError || result.type === "fail"); const pending = !loading && !error && - (result.body.status === "pending" || result.body.status === "selected"); + (result.body.status === "pending" || result.body.status === "selected") + && credentials.status === "loggedIn" + && credentials.username === result.body.username; useEffect(() => { if (!loading && !pending && onOperationAlreadyCompleted) { onOperationAlreadyCompleted(); |