diff options
author | Sebastian <sebasjm@gmail.com> | 2023-03-31 12:15:46 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-03-31 12:27:17 -0300 |
commit | 7ebcb30b9f9a573a04dc19a99df739aefb677c15 (patch) | |
tree | bd97c0c93eabeb133c59fda5083fd625c0e29a9d | |
parent | b74a387e5adbca937442aca36f4b7cb498754b52 (diff) |
show taler bank in devMode
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts | 7 | ||||
-rw-r--r-- | packages/taler-wallet-webextension/src/wallet/Transaction.tsx | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts index 50e71c144..d8bc7d980 100644 --- a/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts +++ b/packages/taler-wallet-webextension/src/wallet/ManageAccount/state.ts @@ -23,6 +23,7 @@ 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 "../../context/translation.js"; import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js"; import { AccountByType, Props, State } from "./index.js"; @@ -38,6 +39,7 @@ export function useComponentState({ const hook = useAsyncAsHook(() => api.wallet.call(WalletApiOperation.ListKnownBankAccounts, { currency }), ); + const { devMode } = useDevContext(); const [payto, setPayto] = useState(""); const [alias, setAlias] = useState(""); @@ -59,9 +61,12 @@ export function useComponentState({ const accountType: Record<string, string> = { "": "Choose one account type", iban: "IBAN", - // bitcoin: "Bitcoin", // "x-taler-bank": "Taler Bank", }; + if (devMode) { + accountType["bitcoin"] = "Bitcoin"; + accountType["x-taler-bank"] = "Taler Bank"; + } const uri = parsePaytoUri(payto); const found = hook.response.accounts.findIndex( diff --git a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx index a9683f680..d95b10297 100644 --- a/packages/taler-wallet-webextension/src/wallet/Transaction.tsx +++ b/packages/taler-wallet-webextension/src/wallet/Transaction.tsx @@ -89,7 +89,7 @@ export function TransactionPage({ useEffect(() => api.listener.onUpdateNotification( - [NotificationType.WithdrawGroupFinished], + [NotificationType.WithdrawGroupFinished, NotificationType.KycRequested], state?.retry, ), ); |