import { AsyncRenderer, Button } from '@vegaprotocol/ui-toolkit'; import { withdrawalProvider, useWithdrawalDialog, WithdrawalsTable, } from '@vegaprotocol/withdraws'; import { useVegaWallet } from '@vegaprotocol/wallet'; import { t } from '@vegaprotocol/i18n'; import { useDataProvider } from '@vegaprotocol/react-helpers'; import { VegaWalletContainer } from '../../components/vega-wallet-container'; export const WithdrawalsContainer = () => { const { pubKey, isReadOnly } = useVegaWallet(); const { data, loading, error, reload } = useDataProvider({ dataProvider: withdrawalProvider, variables: { partyId: pubKey || '' }, skip: !pubKey, }); const openWithdrawDialog = useWithdrawalDialog((state) => state.open); return (
!(data && data.length)} noDataMessage={t('No withdrawals')} reload={reload} />
{!isReadOnly && (
)}
); };