import { gql } from '@apollo/client'; import { t } from '@vegaprotocol/react-helpers'; import { Splash } from '@vegaprotocol/ui-toolkit'; import { useVegaWallet } from '@vegaprotocol/wallet'; import { WithdrawManager } from '@vegaprotocol/withdraws'; import { ASSET_FRAGMENT } from '../../../lib/query-fragments'; import Link from 'next/link'; import { PageQueryContainer } from '../../../components/page-query-container'; import { isERC20Asset } from '../../../lib/assets'; import type { WithdrawPageQuery, WithdrawPageQueryVariables, } from './__generated__/WithdrawPageQuery'; const WITHDRAW_PAGE_QUERY = gql` ${ASSET_FRAGMENT} query WithdrawPageQuery($partyId: ID!) { party(id: $partyId) { id withdrawals { id txHash } accounts { type balance asset { id symbol } } } assets { ...AssetFields } } `; interface WithdrawPageContainerProps { assetId?: string; } /** * Fetches data required for the Deposit page */ export const WithdrawPageContainer = ({ assetId, }: WithdrawPageContainerProps) => { const { keypair } = useVegaWallet(); if (!keypair) { return
{t('Please connect your Vega wallet')}
; } return ({t('No assets on this network')}
{t('You have incomplete withdrawals.')}{' '} {t('Click here to finish withdrawal')}
) : null}