summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Payment/views.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Payment/views.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Payment/views.tsx44
1 files changed, 13 insertions, 31 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx
index c00e570f9..8bbb8dac2 100644
--- a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx
@@ -21,18 +21,16 @@ import {
PreparePayResultType,
TranslatedString,
} from "@gnu-taler/taler-util";
-import { Fragment, h, VNode } from "preact";
+import { useTranslationContext } from "@gnu-taler/web-util/browser";
+import { Fragment, VNode, h } from "preact";
import { Part } from "../../components/Part.js";
import { PaymentButtons } from "../../components/PaymentButtons.js";
-import { SuccessBox, WarningBox } from "../../components/styled/index.js";
+import { ShowFullContractTermPopup } from "../../components/ShowFullContractTermPopup.js";
import { Time } from "../../components/Time.js";
-import { useTranslationContext } from "@gnu-taler/web-util/browser";
-import {
- getAmountWithFee,
- MerchantDetails,
- PurchaseDetails,
-} from "../../wallet/Transaction.js";
+import { SuccessBox, WarningBox } from "../../components/styled/index.js";
+import { MerchantDetails } from "../../wallet/Transaction.js";
import { State } from "./index.js";
+import { EnabledBySettings } from "../../components/EnabledBySettings.js";
type SupportedStates =
| State.Ready
@@ -67,29 +65,6 @@ export function BaseView(state: SupportedStates): VNode {
text={<MerchantDetails merchant={contractTerms.merchant} />}
kind="neutral"
/>
- <Part
- title={i18n.str`Details`}
- text={
- <PurchaseDetails
- price={getAmountWithFee(effective, state.amount, "debit")}
- info={{
- ...contractTerms,
- orderId: contractTerms.order_id,
- contractTermsHash: "",
- // products: contractTerms.products!,
- }}
- proposalId={state.payStatus.proposalId}
- />
- }
- kind="neutral"
- />
- {contractTerms.order_id && (
- <Part
- title={i18n.str`Receipt`}
- text={`#${contractTerms.order_id}` as TranslatedString}
- kind="neutral"
- />
- )}
{contractTerms.pay_deadline && (
<Part
title={i18n.str`Valid until`}
@@ -105,6 +80,13 @@ export function BaseView(state: SupportedStates): VNode {
/>
)}
</section>
+ <EnabledBySettings name="advancedMode">
+ <section style={{ textAlign: "left" }}>
+ <ShowFullContractTermPopup
+ transactionId={state.payStatus.transactionId}
+ />
+ </section>
+ </EnabledBySettings>
<PaymentButtons
amount={effective}
payStatus={state.payStatus}