show taler bank in devMode
This commit is contained in:
parent
b74a387e5a
commit
7ebcb30b9f
@ -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(
|
||||
|
@ -89,7 +89,7 @@ export function TransactionPage({
|
||||
|
||||
useEffect(() =>
|
||||
api.listener.onUpdateNotification(
|
||||
[NotificationType.WithdrawGroupFinished],
|
||||
[NotificationType.WithdrawGroupFinished, NotificationType.KycRequested],
|
||||
state?.retry,
|
||||
),
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user