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 { useState } from "preact/hooks";
|
||||||
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
import { alertFromError, useAlertContext } from "../../context/alert.js";
|
||||||
import { useBackendContext } from "../../context/backend.js";
|
import { useBackendContext } from "../../context/backend.js";
|
||||||
|
import { useDevContext } from "../../context/devContext.js";
|
||||||
import { useTranslationContext } from "../../context/translation.js";
|
import { useTranslationContext } from "../../context/translation.js";
|
||||||
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
import { useAsyncAsHook } from "../../hooks/useAsyncAsHook.js";
|
||||||
import { AccountByType, Props, State } from "./index.js";
|
import { AccountByType, Props, State } from "./index.js";
|
||||||
@ -38,6 +39,7 @@ export function useComponentState({
|
|||||||
const hook = useAsyncAsHook(() =>
|
const hook = useAsyncAsHook(() =>
|
||||||
api.wallet.call(WalletApiOperation.ListKnownBankAccounts, { currency }),
|
api.wallet.call(WalletApiOperation.ListKnownBankAccounts, { currency }),
|
||||||
);
|
);
|
||||||
|
const { devMode } = useDevContext();
|
||||||
|
|
||||||
const [payto, setPayto] = useState("");
|
const [payto, setPayto] = useState("");
|
||||||
const [alias, setAlias] = useState("");
|
const [alias, setAlias] = useState("");
|
||||||
@ -59,9 +61,12 @@ export function useComponentState({
|
|||||||
const accountType: Record<string, string> = {
|
const accountType: Record<string, string> = {
|
||||||
"": "Choose one account type",
|
"": "Choose one account type",
|
||||||
iban: "IBAN",
|
iban: "IBAN",
|
||||||
// bitcoin: "Bitcoin",
|
|
||||||
// "x-taler-bank": "Taler Bank",
|
// "x-taler-bank": "Taler Bank",
|
||||||
};
|
};
|
||||||
|
if (devMode) {
|
||||||
|
accountType["bitcoin"] = "Bitcoin";
|
||||||
|
accountType["x-taler-bank"] = "Taler Bank";
|
||||||
|
}
|
||||||
const uri = parsePaytoUri(payto);
|
const uri = parsePaytoUri(payto);
|
||||||
const found =
|
const found =
|
||||||
hook.response.accounts.findIndex(
|
hook.response.accounts.findIndex(
|
||||||
|
@ -89,7 +89,7 @@ export function TransactionPage({
|
|||||||
|
|
||||||
useEffect(() =>
|
useEffect(() =>
|
||||||
api.listener.onUpdateNotification(
|
api.listener.onUpdateNotification(
|
||||||
[NotificationType.WithdrawGroupFinished],
|
[NotificationType.WithdrawGroupFinished, NotificationType.KycRequested],
|
||||||
state?.retry,
|
state?.retry,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user