diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Payment')
-rw-r--r-- | packages/taler-wallet-webextension/src/cta/Payment/views.tsx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx index 244ac5886..53bc0c95f 100644 --- a/packages/taler-wallet-webextension/src/cta/Payment/views.tsx +++ b/packages/taler-wallet-webextension/src/cta/Payment/views.tsx @@ -27,7 +27,11 @@ import { PaymentButtons } from "../../components/PaymentButtons.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 { + getAmountWithFee, + MerchantDetails, + PurchaseDetails, +} from "../../wallet/Transaction.js"; import { State } from "./index.js"; type SupportedStates = @@ -41,13 +45,10 @@ export function BaseView(state: SupportedStates): VNode { const contractTerms: ContractTerms = state.payStatus.contractTerms; - const price = { - raw: state.amount, - effective: - "amountEffective" in state.payStatus - ? Amounts.parseOrThrow(state.payStatus.amountEffective) - : state.amount, - }; + const effective = + "amountEffective" in state.payStatus + ? Amounts.parseOrThrow(state.payStatus.amountEffective) + : state.amount; return ( <Fragment> @@ -68,7 +69,7 @@ export function BaseView(state: SupportedStates): VNode { title={i18n.str`Details`} text={ <PurchaseDetails - price={price} + price={getAmountWithFee(effective, state.amount, "debit")} info={{ ...contractTerms, orderId: contractTerms.order_id, |