import { useCallback, useState } from 'react'; import { Button } from '@vegaprotocol/ui-toolkit'; import { t } from '@vegaprotocol/react-helpers'; import { WithdrawalDialogs } from '@vegaprotocol/withdraws'; import { Web3Container } from '@vegaprotocol/web3'; import type { AssetFieldsFragment } from '@vegaprotocol/assets'; import { useAssetDetailsDialogStore } from '@vegaprotocol/assets'; import { Splash } from '@vegaprotocol/ui-toolkit'; import { useVegaWallet } from '@vegaprotocol/wallet'; import { AccountManager } from '@vegaprotocol/accounts'; import { DepositDialog } from '@vegaprotocol/deposits'; export const AccountsContainer = () => { const { pubKey } = useVegaWallet(); const [withdrawDialog, setWithdrawDialog] = useState(false); const [depositDialog, setDepositDialog] = useState(false); const { open: openAssetDetailsDialog } = useAssetDetailsDialogStore(); const [assetId, setAssetId] = useState(); const onClickAsset = useCallback( (value?: string | AssetFieldsFragment) => { value && openAssetDetailsDialog(value); }, [openAssetDetailsDialog] ); const onClickWithdraw = useCallback((assetId?: string) => { setWithdrawDialog(true); setAssetId(assetId); }, []); const onClickDeposit = useCallback((assetId?: string) => { setDepositDialog(true); setAssetId(assetId); }, []); if (!pubKey) { return (

{t('Please connect Vega wallet')}

); } return (
); };