aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts')
-rw-r--r--packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts
index 1f8ab4883..641b47cd7 100644
--- a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts
+++ b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts
@@ -23,10 +23,10 @@ import { WalletApiOperation } from "@gnu-taler/taler-wallet-core";
import { useState } from "preact/hooks";
import { alertFromError, useAlertContext } from "../../context/alert.js";
import { useBackendContext } from "../../context/backend.js";
-import { useDevContext } from "../../context/devContext.js";
import { useTranslationContext } from "@gnu-taler/web-util/lib/index.browser";
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
import { AccountByType, Props, State } from "./index.js";
+import { useSettings } from "../../hooks/useSettings.js";
export function useComponentState({
currency,
@@ -39,12 +39,11 @@ export function useComponentState({
const hook = useAsyncAsHook(() =>
api.wallet.call(WalletApiOperation.ListKnownBankAccounts, { currency }),
);
- const { devMode } = useDevContext();
const accountType: Record<string, string> = {
iban: "IBAN",
- // "x-taler-bank": "Taler Bank",
};
- if (devMode) {
+ const [settings] = useSettings();
+ if (settings.extendedAccountTypes) {
accountType["bitcoin"] = "Bitcoin";
accountType["x-taler-bank"] = "Taler Bank";
}