show warning if bank settings are wrong
This commit is contained in:
parent
b567ba4668
commit
2baa42f223
@ -53,10 +53,18 @@ interface LoggedOut {
|
||||
|
||||
export function getInitialBackendBaseURL(): string {
|
||||
const overrideUrl = localStorage.getItem("bank-base-url");
|
||||
|
||||
return canonicalizeBaseUrl(
|
||||
overrideUrl ? overrideUrl : bankUiSettings.backendBaseURL,
|
||||
if (!overrideUrl) {
|
||||
//normal path
|
||||
if (!bankUiSettings.backendBaseURL) {
|
||||
console.error(
|
||||
"ERROR: backendBaseURL was overridden by a setting file and missing. Setting value to 'window.origin'",
|
||||
);
|
||||
return canonicalizeBaseUrl(window.origin);
|
||||
}
|
||||
return canonicalizeBaseUrl(bankUiSettings.backendBaseURL);
|
||||
}
|
||||
// testing/development path
|
||||
return canonicalizeBaseUrl(overrideUrl);
|
||||
}
|
||||
|
||||
export const defaultState: BackendState = {
|
||||
|
@ -20,15 +20,13 @@ import {
|
||||
HttpResponsePaginated,
|
||||
useTranslationContext,
|
||||
} from "@gnu-taler/web-util/lib/index.browser";
|
||||
import { Fragment, h, VNode } from "preact";
|
||||
import { Loading } from "../components/Loading.js";
|
||||
import { Fragment, VNode, h } from "preact";
|
||||
import { Transactions } from "../components/Transactions/index.js";
|
||||
import { PageStateType, notifyError } from "../context/pageState.js";
|
||||
import { useBackendContext } from "../context/backend.js";
|
||||
import { notifyError } from "../context/pageState.js";
|
||||
import { useAccountDetails } from "../hooks/access.js";
|
||||
import { LoginForm } from "./LoginForm.js";
|
||||
import { PaymentOptions } from "./PaymentOptions.js";
|
||||
import { StateUpdater } from "preact/hooks";
|
||||
import { useBackendContext } from "../context/backend.js";
|
||||
|
||||
interface Props {
|
||||
account: string;
|
||||
|
@ -48,20 +48,9 @@ export function QrCodeSection({
|
||||
<p>
|
||||
<i18n.Translate>
|
||||
Click{" "}
|
||||
<a
|
||||
id="linkqr"
|
||||
href={talerWithdrawUri}
|
||||
>{i18n.str`this taler:// link`}</a>{" "}
|
||||
to open your Taler wallet
|
||||
<a href={talerWithdrawUri}>{i18n.str`this taler:// link`}</a> to
|
||||
open your Taler wallet
|
||||
</i18n.Translate>{" "}
|
||||
<i18n.Translate>
|
||||
or try{" "}
|
||||
<a
|
||||
id="linkqr"
|
||||
href={"ext+" + talerWithdrawUri}
|
||||
>{i18n.str`this ext+taler:// link`}</a>{" "}
|
||||
if your browser does not support <b>taler://</b> scheme.
|
||||
</i18n.Translate>
|
||||
</p>
|
||||
<br />
|
||||
<a
|
||||
|
Loading…
Reference in New Issue
Block a user