From 9b04d8bf3581d162cbd631892ca115df811c46f8 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 9 Jan 2023 08:38:48 -0300 Subject: fix #7152 --- .../src/wallet/Transaction.tsx | 119 ++++++++++----------- 1 file changed, 59 insertions(+), 60 deletions(-) (limited to 'packages/taler-wallet-webextension/src/wallet/Transaction.tsx') diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index b7eb4a947..542694490 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -32,6 +32,7 @@ import { TransactionRefund, TransactionTip, TransactionType, + TranslatedString, WithdrawalType, } from "@gnu-taler/taler-util"; import { WalletApiOperation } from "@gnu-taler/taler-wallet-core"; @@ -43,9 +44,8 @@ import emptyImg from "../../static/img/empty.png"; import { Amount } from "../components/Amount.js"; import { BankDetailsByPaytoType } from "../components/BankDetailsByPaytoType.js"; import { CopyButton } from "../components/CopyButton.js"; -import { ErrorTalerOperation } from "../components/ErrorTalerOperation.js"; +import { AlertView, ErrorAlertView } from "../components/CurrentAlerts.js"; import { Loading } from "../components/Loading.js"; -import { LoadingError } from "../components/LoadingError.js"; import { Kind, Part, PartCollapsible, PartPayto } from "../components/Part.js"; import { QR } from "../components/QR.js"; import { ShowFullContractTermPopup } from "../components/ShowFullContractTermPopup.js"; @@ -60,6 +60,7 @@ import { WarningBox, } from "../components/styled/index.js"; import { Time } from "../components/Time.js"; +import { alertFromError } from "../context/alert.js"; import { useBackendContext } from "../context/backend.js"; import { useTranslationContext } from "../context/translation.js"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook.js"; @@ -98,13 +99,11 @@ export function TransactionPage({ if (state.hasError) { return ( - - Could not load the transaction information - - } - error={state} + ); } @@ -199,14 +198,14 @@ export function TransactionView({ return (
- - There was an error trying to complete the transaction - - } - error={transaction?.error} - /> + {transaction?.error ? ( + + ) : undefined} {transaction.pending && ( This transaction is not completed @@ -367,7 +366,7 @@ export function TransactionView({ )} Details} + title={i18n.str`Details`} text={ {transaction.refunds.length > 0 ? ( Refunds} + title={i18n.str`Refunds`} text={ {transaction.refunds.map((r, i) => { @@ -462,7 +461,7 @@ export function TransactionView({ picked up. Offer} + title={i18n.str`Offer`} text={} kind="positive" /> @@ -480,17 +479,17 @@ export function TransactionView({ )} Merchant} + title={i18n.str`Merchant`} text={} kind="neutral" /> Invoice ID} - text={transaction.info.orderId} + title={i18n.str`Invoice ID`} + text={transaction.info.orderId as TranslatedString} kind="neutral" /> Details} + title={i18n.str`Details`} text={ {payto && } Details} + title={i18n.str`Details`} text={} kind="neutral" /> Wire transfer deadline} + title={i18n.str`Wire transfer deadline`} text={
Delivery} + title={i18n.str`Delivery`} text={