diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-12 11:29:14 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-12 11:29:14 -0300 |
commit | 5d0ad07def92410663c54dcba5693090fbb19385 (patch) | |
tree | 9964a6b9cef15236ceb0dde4342bb6be94d454e2 /packages/taler-wallet-webextension/src/cta/Payment | |
parent | 8a30d2fa75d57ec4c1b407e46900f8ecedf2a64c (diff) | |
download | wallet-core-5d0ad07def92410663c54dcba5693090fbb19385.tar.xz |
show contract terms in dev mode
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Payment')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Payment/views.tsx | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx index 1007260d2..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,22 +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.transactionId} - /> - } - kind="neutral" - /> {contractTerms.pay_deadline && ( <Part title={i18n.str`Valid until`} @@ -98,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} |