aboutsummaryrefslogtreecommitdiff
path: root/packages/demobank-ui/src/components/Cashouts/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/demobank-ui/src/components/Cashouts/index.ts')
-rw-r--r--packages/demobank-ui/src/components/Cashouts/index.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/packages/demobank-ui/src/components/Cashouts/index.ts b/packages/demobank-ui/src/components/Cashouts/index.ts
index ae020cef6..09839e753 100644
--- a/packages/demobank-ui/src/components/Cashouts/index.ts
+++ b/packages/demobank-ui/src/components/Cashouts/index.ts
@@ -18,16 +18,16 @@ import { HttpError, utils } from "@gnu-taler/web-util/browser";
import { Loading } from "../Loading.js";
// import { compose, StateViewMap } from "../../utils/index.js";
// import { wxApi } from "../../wxApi.js";
-import { AbsoluteTime, AmountJson, TalerCorebankApi, TalerError } from "@gnu-taler/taler-util";
+import { AbsoluteTime, AmountJson, TalerCoreBankErrorsByMethod, TalerCorebankApi, TalerError } from "@gnu-taler/taler-util";
import { useComponentState } from "./state.js";
-import { LoadingUriView, ReadyView } from "./views.js";
+import { FailedView, LoadingUriView, ReadyView } from "./views.js";
export interface Props {
account: string;
onSelected: (id: string) => void;
}
-export type State = State.Loading | State.LoadingUriError | State.Ready;
+export type State = State.Loading | State.Failed | State.LoadingUriError | State.Ready;
export namespace State {
export interface Loading {
@@ -40,6 +40,11 @@ export namespace State {
error: TalerError;
}
+ export interface Failed {
+ status: "failed";
+ error: TalerCoreBankErrorsByMethod<"getAccountCashouts">;
+ }
+
export interface BaseInfo {
error: undefined;
}
@@ -62,6 +67,7 @@ export interface Transaction {
const viewMapping: utils.StateViewMap<State> = {
loading: Loading,
"loading-error": LoadingUriView,
+ "failed": FailedView,
ready: ReadyView,
};