aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/pages/AccountPage/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/pages/AccountPage/index.ts')
-rw-r--r--packages/demobank-ui/src/pages/AccountPage/index.ts25
1 files changed, 11 insertions, 14 deletions
diff --git a/packages/demobank-ui/src/pages/AccountPage/index.ts b/packages/demobank-ui/src/pages/AccountPage/index.ts
index 9230fb6b1..ef6b4fede 100644
--- a/packages/demobank-ui/src/pages/AccountPage/index.ts
+++ b/packages/demobank-ui/src/pages/AccountPage/index.ts
@@ -14,20 +14,17 @@
GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
*/
-import { HttpError, HttpResponseOk, HttpResponsePaginated, utils } from "@gnu-taler/web-util/browser";
-import { AbsoluteTime, AmountJson, PaytoUriIBAN, PaytoUriTalerBank } from "@gnu-taler/taler-util";
-import { Loading } from "../../components/Loading.js";
-import { useComponentState } from "./state.js";
-import { ReadyView, InvalidIbanView } from "./views.js";
+import { AbsoluteTime, AmountJson, TalerCorebankApi, TalerError, TalerErrorDetail } from "@gnu-taler/taler-util";
+import { HttpResponsePaginated, utils } from "@gnu-taler/web-util/browser";
import { VNode } from "preact";
-import { LoginForm } from "../LoginForm.js";
import { ErrorLoading } from "../../components/ErrorLoading.js";
+import { Loading } from "../../components/Loading.js";
+import { LoginForm } from "../LoginForm.js";
+import { useComponentState } from "./state.js";
+import { InvalidIbanView, ReadyView } from "./views.js";
export interface Props {
account: string;
- onLoadNotOk: <T>(
- error: HttpResponsePaginated<T, SandboxBackend.SandboxError>,
- ) => VNode;
goToBusinessAccount: () => void;
goToConfirmOperation: (id: string) => void;
}
@@ -42,7 +39,7 @@ export namespace State {
export interface LoadingError {
status: "loading-error";
- error: HttpError<SandboxBackend.SandboxError>;
+ error: TalerError;
}
export interface BaseInfo {
@@ -60,12 +57,12 @@ export namespace State {
export interface InvalidIban {
status: "invalid-iban",
- error: HttpResponseOk<SandboxBackend.CoreBank.AccountData>;
+ error: TalerCorebankApi.AccountData;
}
export interface UserNotFound {
- status: "error-user-not-found",
- error: HttpError<any>;
+ status: "login",
+ reason: "not-found" | "forbidden";
onRegister?: () => void;
}
}
@@ -80,7 +77,7 @@ export interface Transaction {
const viewMapping: utils.StateViewMap<State> = {
loading: Loading,
- "error-user-not-found": LoginForm,
+ "login": LoginForm,
"invalid-iban": InvalidIbanView,
"loading-error": ErrorLoading,
ready: ReadyView,