aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/popup/BalancePage.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/popup/BalancePage.tsx
parent1d7c8f7083f2aa98295f1ad28399c8e19a9e7754 (diff)
downloadwallet-core-08959f83bc9f6d5df93cb6c2d34b671bf419d05a.tar.xz
take translator from transaltion context
Diffstat (limited to 'packages/taler-wallet-webextension/src/popup/BalancePage.tsx')
-rw-r--r--packages/taler-wallet-webextension/src/popup/BalancePage.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx
index 53b4e1518..c894c333f 100644
--- a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx
+++ b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx
@@ -17,7 +17,6 @@
import {
Amounts,
Balance,
- i18n,
NotificationType,
Transaction,
} from "@gnu-taler/taler-util";
@@ -29,6 +28,7 @@ import { Loading } from "../components/Loading";
import { LoadingError } from "../components/LoadingError";
import { MultiActionButton } from "../components/MultiActionButton";
import { ButtonBoxPrimary, ButtonPrimary } from "../components/styled";
+import { useTranslationContext } from "../context/translation";
import { useAsyncAsHook } from "../hooks/useAsyncAsHook";
import { AddNewActionView } from "../wallet/AddNewActionView";
import * as wxApi from "../wxApi";
@@ -44,6 +44,7 @@ export function BalancePage({
goToWalletDeposit,
goToWalletHistory,
}: Props): VNode {
+ const { i18n } = useTranslationContext();
const [addingAction, setAddingAction] = useState(false);
const state = useAsyncAsHook(wxApi.getBalance, [
NotificationType.WithdrawGroupFinished,
@@ -92,6 +93,7 @@ export function BalanceView({
goToWalletHistory,
goToAddAction,
}: BalanceViewProps): VNode {
+ const { i18n } = useTranslationContext();
const currencyWithNonZeroAmount = balances
.filter((b) => !Amounts.isZero(b.available))
.map((b) => b.available.split(":")[0]);