---
description: Showcases a detailed record of account deposits and withdrawals
---

# Balance History

The Balance History component displays a user's deposit and withdrawal transactions.

**Component Overview**

* **Purpose:** To present a detailed view of a user's transaction history related to deposits and withdrawals.
* **Features:**
  * Display of each transaction's action, amount, and timestamp.
  * User-friendly messages for empty or loading states.

**Usage**

This component is displayed in the "My Account" page of the application.&#x20;

**Key Hooks and Functionalities**

* **State Management Hooks:**
  * `useActiveAccountAddress` for fetching the address of the currently active account.
  * `useBalanceHistory` and `useGetBalanceHistoryCallback` for retrieving and displaying the balance history data.
* **Effect Hooks:**
  * Fetch balance history data upon component mount or when the active sub-account changes.
  * Set the loading state based on the presence of balance history data.

**Interactive Elements**

* **Header:** Displays column headers for "Action", "Amount", and "Time", indicating the data presented.
* **ItemsContainer:** Contains the individual transaction records, each rendered by the `HistoryData` component.

\
