import { useRef, memo, useState } from 'react'; import { addDecimalsFormatNumber } from '@vegaprotocol/utils'; import { t } from '@vegaprotocol/i18n'; import { useDataProvider } from '@vegaprotocol/data-provider'; import type { AgGridReact } from 'ag-grid-react'; import { aggregatedAccountsDataProvider, aggregatedAccountDataProvider, } from './accounts-data-provider'; import type { PinnedAsset } from './accounts-table'; import { AccountTable } from './accounts-table'; import { Dialog } from '@vegaprotocol/ui-toolkit'; import BreakdownTable from './breakdown-table'; const AccountBreakdown = ({ assetId, partyId, }: { assetId: string; partyId: string; }) => { const { data } = useDataProvider({ dataProvider: aggregatedAccountDataProvider, variables: { partyId, assetId }, }); return (
{t('You have %s %s in total.', [ addDecimalsFormatNumber(data.total, data.asset.decimals), data.asset.symbol, ])}
)}