e463bbe238
* feat: unhardcode contract addresses * fix: linting and tests * feat: switch contract usage in token app to use unhardcoded addresses * chore: remove other usage of hard coded contract addresses * feat: convert contracts to classes, update claim contract to fix circular dependency * feat: add hard coded contract addresses to contracts page * fix: misc tidy up * chore: rename ethers big num conversion func * fix: remove pending transactions modal * chore: add single toBigNum function that can accept number string or EthersBignNumber * chore: delete unused tranche helpers and decimals functions from smart contracts lib * feat: add faucetable token class * fix: reset tx state after early exit from approve tx * feat: re add transaction modal using zustand store * fix: loader colors for eth wallet * fix: pass ethereum config to gurantee existence before tx execution * chore: lint smart contracts lib * chore: fix web3container to use children and not render prop * chore: lint * fix: use background to mock ethereum wallet to avoid mocking globally for every test * chore: move web3 mock to common steps and call from withdrawals feature tests
83 lines
3.0 KiB
TypeScript
83 lines
3.0 KiB
TypeScript
import { Web3Container } from '../../components/web3-container';
|
|
import { t } from '@vegaprotocol/react-helpers';
|
|
import { PositionsContainer } from '@vegaprotocol/positions';
|
|
import { OrderListContainer } from '@vegaprotocol/order-list';
|
|
import { AccountsContainer } from '@vegaprotocol/accounts';
|
|
import { AnchorButton } from '@vegaprotocol/ui-toolkit';
|
|
|
|
import { WithdrawalsContainer } from './withdrawals/withdrawals-container';
|
|
import { GridTab, GridTabs } from '../../components/grid-tabs';
|
|
|
|
const Portfolio = () => {
|
|
const tabClassName = 'p-[16px] pl-[316px]';
|
|
|
|
return (
|
|
<Web3Container>
|
|
<div className="h-full text-ui">
|
|
<main className="relative h-[calc(100%-200px)]">
|
|
<aside className="absolute px-[8px] py-[16px] w-[300px] mt-[28px] h-[calc(100%-28px)] w-[300px] overflow-auto">
|
|
<h2 className="text-h4 text-black dark:text-white">
|
|
{t('Filters')}
|
|
</h2>
|
|
</aside>
|
|
<section>
|
|
<GridTabs group="portfolio">
|
|
<GridTab id="positions" name={t('Positions')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Positions')}
|
|
</h4>
|
|
<PositionsContainer />
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="orders" name={t('Orders')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Orders')}
|
|
</h4>
|
|
<OrderListContainer />
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="fills" name={t('Fills')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('Fills')}
|
|
</h4>
|
|
</div>
|
|
</GridTab>
|
|
<GridTab id="history" name={t('History')}>
|
|
<div className={tabClassName}>
|
|
<h4 className="text-h4 text-black dark:text-white">
|
|
{t('History')}
|
|
</h4>
|
|
</div>
|
|
</GridTab>
|
|
</GridTabs>
|
|
</section>
|
|
</main>
|
|
<section className="fixed bottom-0 left-0 w-full h-[200px]">
|
|
<GridTabs group="collaterals">
|
|
<GridTab id="collateral" name={t('Collateral')}>
|
|
<AccountsContainer />
|
|
</GridTab>
|
|
<GridTab id="deposits" name={t('Deposits')}>
|
|
<AnchorButton data-testid="deposit" href="/portfolio/deposit">
|
|
{t('Deposit')}
|
|
</AnchorButton>
|
|
</GridTab>
|
|
<GridTab id="withdrawals" name={t('Withdrawals')}>
|
|
<WithdrawalsContainer />
|
|
</GridTab>
|
|
</GridTabs>
|
|
</section>
|
|
</div>
|
|
</Web3Container>
|
|
);
|
|
};
|
|
|
|
Portfolio.getInitialProps = () => ({
|
|
page: 'portfolio',
|
|
});
|
|
|
|
export default Portfolio;
|