From 08959f83bc9f6d5df93cb6c2d34b671bf419d05a Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 14 Mar 2022 15:20:32 -0300
Subject: take translator from transaltion context

---
 packages/taler-wallet-webextension/src/cta/Pay.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'packages/taler-wallet-webextension/src/cta/Pay.tsx')

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" }}>
-- 
cgit v1.2.3

