diff options
author | Sebastian <sebasjm@gmail.com> | 2023-01-09 08:38:48 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-01-09 08:38:48 -0300 |
commit | 9b04d8bf3581d162cbd631892ca115df811c46f8 (patch) | |
tree | 42b7da7cc3a3f8186823a7571aa221dc8e9aa7a5 /packages/taler-wallet-webextension/src/cta/Payment/views.tsx | |
parent | 14f3d1e06dda003d457f2b3531e197011a284244 (diff) | |
download | wallet-core-9b04d8bf3581d162cbd631892ca115df811c46f8.tar.xz |
fix #7152
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Payment/views.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Payment/views.tsx | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx index efc8bcfc4..244ac5886 100644 --- a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx @@ -19,28 +19,17 @@ import { Amounts, MerchantContractTerms as ContractTerms, PreparePayResultType, + TranslatedString, } from "@gnu-taler/taler-util"; import { Fragment, h, VNode } from "preact"; -import { LoadingError } from "../../components/LoadingError.js"; import { Part } from "../../components/Part.js"; import { PaymentButtons } from "../../components/PaymentButtons.js"; -import { Link, SuccessBox, WarningBox } from "../../components/styled/index.js"; +import { SuccessBox, WarningBox } from "../../components/styled/index.js"; import { Time } from "../../components/Time.js"; import { useTranslationContext } from "../../context/translation.js"; import { MerchantDetails, PurchaseDetails } from "../../wallet/Transaction.js"; import { State } from "./index.js"; -export function LoadingUriView({ error }: State.LoadingUriError): VNode { - const { i18n } = useTranslationContext(); - - return ( - <LoadingError - title={<i18n.Translate>Could not load pay status</i18n.Translate>} - error={error} - /> - ); -} - type SupportedStates = | State.Ready | State.Confirmed @@ -66,17 +55,17 @@ export function BaseView(state: SupportedStates): VNode { <section style={{ textAlign: "left" }}> <Part - title={<i18n.Translate>Purchase</i18n.Translate>} - text={contractTerms.summary} + title={i18n.str`Purchase`} + text={contractTerms.summary as TranslatedString} kind="neutral" /> <Part - title={<i18n.Translate>Merchant</i18n.Translate>} + title={i18n.str`Merchant`} text={<MerchantDetails merchant={contractTerms.merchant} />} kind="neutral" /> <Part - title={<i18n.Translate>Details</i18n.Translate>} + title={i18n.str`Details`} text={ <PurchaseDetails price={price} @@ -93,14 +82,14 @@ export function BaseView(state: SupportedStates): VNode { /> {contractTerms.order_id && ( <Part - title={<i18n.Translate>Receipt</i18n.Translate>} - text={`#${contractTerms.order_id}`} + title={i18n.str`Receipt`} + text={`#${contractTerms.order_id}` as TranslatedString} kind="neutral" /> )} {contractTerms.pay_deadline && ( <Part - title={<i18n.Translate>Valid until</i18n.Translate>} + title={i18n.str`Valid until`} text={ <Time timestamp={AbsoluteTime.fromTimestamp( @@ -121,11 +110,6 @@ export function BaseView(state: SupportedStates): VNode { payHandler={state.status === "ready" ? state.payHandler : undefined} goToWalletManualWithdraw={state.goToWalletManualWithdraw} /> - <section> - <Link upperCased onClick={state.cancel}> - <i18n.Translate>Cancel</i18n.Translate> - </Link> - </section> </Fragment> ); } |