summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/cta/Pay.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-03-14 15:20:32 -0300
committerSebastian <sebasjm@gmail.com>2022-03-14 15:21:24 -0300
commit08959f83bc9f6d5df93cb6c2d34b671bf419d05a (patch)
tree1a366b05453de18b598c9a587caea7ba6d1c93e7 /packages/taler-wallet-webextension/src/cta/Pay.tsx
parent1d7c8f7083f2aa98295f1ad28399c8e19a9e7754 (diff)
downloadwallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.tar.gz
wallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.tar.bz2
wallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.zip
take translator from transaltion context
Diffstat (limited to 'packages/taler-wallet-webextension/src/cta/Pay.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/cta/Pay.tsx8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/cta/Pay.tsx b/packages/taler-wallet-webextension/src/cta/Pay.tsx
index 4fe44dcff..ba31f4c34 100644
--- a/packages/taler-wallet-webextension/src/cta/Pay.tsx
+++ b/packages/taler-wallet-webextension/src/cta/Pay.tsx
@@ -22,7 +22,6 @@
/**
* Imports.
*/
-// import * as i18n from "../i18n";
import {
AmountJson,
@@ -32,12 +31,10 @@ import {
ConfirmPayResultDone,
ConfirmPayResultType,
ContractTerms,
- i18n,
NotificationType,
PreparePayResult,
PreparePayResultType,
Product,
- Translate,
} from "@gnu-taler/taler-util";
import { OperationFailedError } from "@gnu-taler/taler-wallet-core";
import { Fragment, h, VNode } from "preact";
@@ -50,13 +47,13 @@ import { Part } from "../components/Part";
import { QR } from "../components/QR";
import {
ButtonSuccess,
- LightText,
LinkSuccess,
SmallLightText,
SuccessBox,
WalletAction,
WarningBox,
} from "../components/styled";
+import { useTranslationContext } from "../context/translation";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook";
import * as wxApi from "../wxApi";
@@ -89,6 +86,7 @@ export function PayPage({
goToWalletManualWithdraw,
goBack,
}: Props): VNode {
+ const { i18n } = useTranslationContext();
const [payResult, setPayResult] = useState<ConfirmPayResult | undefined>(
undefined,
);
@@ -166,6 +164,7 @@ export function PaymentRequestView({
goToWalletManualWithdraw,
balance,
}: PaymentRequestViewProps): VNode {
+ const { i18n } = useTranslationContext();
let totalFees: AmountJson = Amounts.getZero(payStatus.amountRaw);
const contractTerms: ContractTerms = payStatus.contractTerms;
@@ -412,6 +411,7 @@ export function PaymentRequestView({
}
function ProductList({ products }: { products: Product[] }): VNode {
+ const { i18n } = useTranslationContext();
return (
<Fragment>
<SmallLightText style={{ margin: ".5em" }}>