diff options
Diffstat (limited to 'packages/taler-wallet-webextension/src/popup/BalancePage.tsx')
-rw-r--r-- | packages/taler-wallet-webextension/src/popup/BalancePage.tsx | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx index e85c00d60..53b4e1518 100644 --- a/packages/taler-wallet-webextension/src/popup/BalancePage.tsx +++ b/packages/taler-wallet-webextension/src/popup/BalancePage.tsx @@ -28,7 +28,6 @@ import { JustInDevMode } from "../components/JustInDevMode"; import { Loading } from "../components/Loading"; import { LoadingError } from "../components/LoadingError"; import { MultiActionButton } from "../components/MultiActionButton"; -import PendingTransactions from "../components/PendingTransactions"; import { ButtonBoxPrimary, ButtonPrimary } from "../components/styled"; import { useAsyncAsHook } from "../hooks/useAsyncAsHook"; import { AddNewActionView } from "../wallet/AddNewActionView"; @@ -46,19 +45,10 @@ export function BalancePage({ goToWalletHistory, }: Props): VNode { const [addingAction, setAddingAction] = useState(false); - const state = useAsyncAsHook( - async () => ({ - balance: await wxApi.getBalance(), - pending: await wxApi.getTransactions(), - }), - [NotificationType.WithdrawGroupFinished], - ); - const balances = - !state || state.hasError ? [] : state.response.balance.balances; - const pending = - !state || state.hasError - ? [] - : state.response.pending.transactions.filter((t) => t.pending); + const state = useAsyncAsHook(wxApi.getBalance, [ + NotificationType.WithdrawGroupFinished, + ]); + const balances = !state || state.hasError ? [] : state.response.balances; if (!state) { return <Loading />; @@ -80,7 +70,6 @@ export function BalancePage({ return ( <BalanceView balances={balances} - pending={pending} goToWalletManualWithdraw={goToWalletManualWithdraw} goToWalletDeposit={goToWalletDeposit} goToWalletHistory={goToWalletHistory} @@ -90,7 +79,6 @@ export function BalancePage({ } export interface BalanceViewProps { balances: Balance[]; - pending: Transaction[]; goToWalletManualWithdraw: () => void; goToAddAction: () => void; goToWalletDeposit: (currency: string) => void; @@ -99,7 +87,6 @@ export interface BalanceViewProps { export function BalanceView({ balances, - pending, goToWalletManualWithdraw, goToWalletDeposit, goToWalletHistory, @@ -117,9 +104,6 @@ export function BalanceView({ return ( <Fragment> - {/* {pending.length > 0 ? ( - <PendingTransactions transactions={pending} /> - ) : undefined} */} <section> <BalanceTable balances={balances} |