show taler bank in devMode

This commit is contained in:
Sebastian 2023-03-31 12:15:46 -03:00
parent b74a387e5a
commit 7ebcb30b9f
No known key found for this signature in database
GPG Key ID: 173909D1A5F66069
2 changed files with 7 additions and 2 deletions

View File

@ -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(

View File

@ -89,7 +89,7 @@ export function TransactionPage({
useEffect(() =>
api.listener.onUpdateNotification(
[NotificationType.WithdrawGroupFinished],
[NotificationType.WithdrawGroupFinished, NotificationType.KycRequested],
state?.retry,
),
);