From c191a2da860fe7ba9a2439f04c94cdd894bd1fa8 Mon Sep 17 00:00:00 2001
From: Sebastian <sebasjm@gmail.com>
Date: Mon, 20 Feb 2023 10:18:02 -0300
Subject: fix missing props

---
 packages/demobank-ui/src/pages/BusinessAccount.tsx | 25 +++++++++++++---------
 1 file changed, 15 insertions(+), 10 deletions(-)

(limited to 'packages/demobank-ui/src/pages/BusinessAccount.tsx')

diff --git a/packages/demobank-ui/src/pages/BusinessAccount.tsx b/packages/demobank-ui/src/pages/BusinessAccount.tsx
index 64ec81c2e..fd7d2535c 100644
--- a/packages/demobank-ui/src/pages/BusinessAccount.tsx
+++ b/packages/demobank-ui/src/pages/BusinessAccount.tsx
@@ -32,11 +32,10 @@ import { ErrorMessage, usePageContext } from "../context/pageState.js";
 import { useAccountDetails } from "../hooks/access.js";
 import {
   useCashoutDetails,
-  useCashouts,
   useCircuitAccountAPI,
   useRatiosAndFeeConfig,
 } from "../hooks/circuit.js";
-import { CashoutStatus, TanChannel, undefinedIfEmpty } from "../utils.js";
+import { TanChannel, undefinedIfEmpty } from "../utils.js";
 import { ShowAccountDetails, UpdateAccountPassword } from "./AdminPage.js";
 import { ErrorBanner } from "./BankFrame.js";
 import { LoginForm } from "./LoginForm.js";
@@ -57,7 +56,9 @@ export function BusinessAccount({
   const backend = useBackendContext();
   const [updatePassword, setUpdatePassword] = useState(false);
   const [newCashout, setNewcashout] = useState(false);
-  const [showCashout, setShowCashout] = useState<string | undefined>();
+  const [showCashoutDetails, setShowCashoutDetails] = useState<
+    string | undefined
+  >();
   function showInfoMessage(info: TranslatedString): void {
     pageStateSetter((prev) => ({
       ...prev,
@@ -79,18 +80,18 @@ export function BusinessAccount({
         }}
         onComplete={(id) => {
           setNewcashout(false);
-          setShowCashout(id);
+          setShowCashoutDetails(id);
         }}
       />
     );
   }
-  if (showCashout) {
+  if (showCashoutDetails) {
     return (
-      <ShowCashout
-        id={showCashout}
+      <ShowCashoutDetails
+        id={showCashoutDetails}
         onLoadNotOk={onLoadNotOk}
         onCancel={() => {
-          setShowCashout(undefined);
+          setShowCashoutDetails(undefined);
         }}
       />
     );
@@ -129,7 +130,7 @@ export function BusinessAccount({
           <Cashouts
             account={backend.state.username}
             onSelected={(id) => {
-              setShowCashout(id);
+              setShowCashoutDetails(id);
             }}
           />
         </div>
@@ -593,7 +594,11 @@ interface ShowCashoutProps {
   onCancel: () => void;
   onLoadNotOk: <T, E>(error: HttpResponsePaginated<T, E>) => VNode;
 }
-function ShowCashout({ id, onCancel, onLoadNotOk }: ShowCashoutProps): VNode {
+export function ShowCashoutDetails({
+  id,
+  onCancel,
+  onLoadNotOk,
+}: ShowCashoutProps): VNode {
   const { i18n } = useTranslationContext();
   const result = useCashoutDetails(id);
   const { abortCashout, confirmCashout } = useCircuitAccountAPI();
-- 
cgit v1.2.3

