summaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/Transaction.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/wallet/Transaction.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/wallet/Transaction.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/Transaction.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
index cae70d60d..fc54d3c3a 100644
--- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
+++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx
@@ -17,7 +17,6 @@
import {
AmountLike,
Amounts,
- i18n,
NotificationType,
parsePaytoUri,
Transaction,
@@ -46,6 +45,7 @@ import {
WarningBox,
} from "../components/styled";
import { Time } from "../components/Time";
+import { useTranslationContext } from "../context/translation";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook";
import * as wxApi from "../wxApi";
@@ -54,6 +54,7 @@ interface Props {
goToWalletHistory: (currency?: string) => void;
}
export function TransactionPage({ tid, goToWalletHistory }: Props): VNode {
+ const { i18n } = useTranslationContext();
async function getTransaction(): Promise<Transaction> {
const res = await wxApi.getTransactions();
const ts = res.transactions.filter((t) => t.transactionId === tid);
@@ -127,6 +128,8 @@ export function TransactionView({
}
}
+ const { i18n } = useTranslationContext();
+
function TransactionTemplate({
children,
}: {