diff options
Diffstat (limited to 'packages/demobank-ui/src/components/Cashouts/state.ts')
-rw-r--r-- | packages/demobank-ui/src/components/Cashouts/state.ts | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/packages/demobank-ui/src/components/Cashouts/state.ts b/packages/demobank-ui/src/components/Cashouts/state.ts index 7e420940f..178a1e815 100644 --- a/packages/demobank-ui/src/components/Cashouts/state.ts +++ b/packages/demobank-ui/src/components/Cashouts/state.ts @@ -18,27 +18,24 @@ import { AbsoluteTime, Amounts } from "@gnu-taler/taler-util"; import { useCashouts } from "../../hooks/circuit.js"; import { Props, State, Transaction } from "./index.js"; -export function useComponentState({ - account, -}: Props): State { - const result = useCashouts() +export function useComponentState({ empty }: Props): State { + const result = useCashouts(); if (result.loading) { return { status: "loading", - error: undefined - } + error: undefined, + }; } if (!result.ok) { return { status: "loading-error", - error: result - } + error: result, + }; } - return { status: "ready", error: undefined, - cashout: result.data, + cashouts: result.data, }; } |