2022-10-11 12:30:07 +00:00
|
|
|
import { DealTicketContainer } from '@vegaprotocol/deal-ticket';
|
2022-10-14 07:09:11 +00:00
|
|
|
import { MarketInfoContainer, getExpiryDate } from '@vegaprotocol/market-info';
|
feat: market list mega dropdown (rich popover) (#889)
* feat: use MarketList query only
* fix: remove Market.ts from index
* feat: 30 refactor dialog, market list, change query
* feat: #30 add indicativeVolume, total fees, tooltip, large dialog, tooltip accepts html description
* fix: #30 total fees display in tooltip
* fix: #30 toggle title on dialog open
* fix: #30 fix order, price, high, low utils
* fix: #30 fix test for market utils
* feat: #30 add popover with markets to select
* feat: #30 storybook popover
* feat: #30 remove border on trigger and add some other classes
* fix: #30 fix format check with format:write
* feat: #30 add tooltip on taker fee
* feat: #30 add tooltip on taker fee
* fix: #30 format on select market list
* fix: #30 remove unknown cast in test mock data
* fix: #30 show markets where you have open positions
* fix: #30 double check if open positions
* fix: #30 dialog has only small/large sizes
* feat: #30 add border on trigger and change padding and no wrap
* fix: #30 if fees or factors are not found
* fix: #30 remove markets.cy tests as markets page is now gone
* fix #30 remove view full market list test
* fix: #30 add rotating arrow on market title
* fix: #30 add ease-in-out on popover
* fix: #30 add ease-in-out on popover
* fix: #30 align select a market table
* fix: #30 select a market title
* fix: #30 select a market title
* fix: #30 fix any validateDOMnesting issues
* fix: #30 show loading market data
* fix: #30 add list of header columns
* fix: #30 add list of header columns
* fix: #30 small refactoring after review
* fix: #30 update bold undreline class names
* fix: #30 add large-mobile size
* feat: #30 refactor select markets tables to render array of columns
* fix: #30 remove size from select market dialog
* fix: #30 add extra file for columns
* fix: #30 update formtting
* fix: #30 make sure popup closes on same market navigation
* fix: rename market-utils, add calcCandle methods, store market id on select
* fix: useMemo ondata and marketPositionData + orderbook stories fix
* feat: #30 add open volume positions
* fix: add market summary back
* fix: update formatting
* fix: use currentcolor on arrow
* fix: create all markets page
* fix: add overflow-y auto
* fix: enlarge select market to get started dialog
* fix: revert markets container
* fix: use query to fix flickering on position markets
* fix: edit unordered list in tooltips
* fix: fix tooltip table
* fix: fix home.cy.ts
* chore: skip /markets tests
2022-08-11 11:56:35 +00:00
|
|
|
import { OrderbookContainer } from '@vegaprotocol/market-depth';
|
2022-07-13 14:23:46 +00:00
|
|
|
import { OrderListContainer } from '@vegaprotocol/orders';
|
2022-08-19 08:03:31 +00:00
|
|
|
import { FillsContainer } from '@vegaprotocol/fills';
|
2022-03-29 22:52:51 +00:00
|
|
|
import { PositionsContainer } from '@vegaprotocol/positions';
|
feat: market list mega dropdown (rich popover) (#889)
* feat: use MarketList query only
* fix: remove Market.ts from index
* feat: 30 refactor dialog, market list, change query
* feat: #30 add indicativeVolume, total fees, tooltip, large dialog, tooltip accepts html description
* fix: #30 total fees display in tooltip
* fix: #30 toggle title on dialog open
* fix: #30 fix order, price, high, low utils
* fix: #30 fix test for market utils
* feat: #30 add popover with markets to select
* feat: #30 storybook popover
* feat: #30 remove border on trigger and add some other classes
* fix: #30 fix format check with format:write
* feat: #30 add tooltip on taker fee
* feat: #30 add tooltip on taker fee
* fix: #30 format on select market list
* fix: #30 remove unknown cast in test mock data
* fix: #30 show markets where you have open positions
* fix: #30 double check if open positions
* fix: #30 dialog has only small/large sizes
* feat: #30 add border on trigger and change padding and no wrap
* fix: #30 if fees or factors are not found
* fix: #30 remove markets.cy tests as markets page is now gone
* fix #30 remove view full market list test
* fix: #30 add rotating arrow on market title
* fix: #30 add ease-in-out on popover
* fix: #30 add ease-in-out on popover
* fix: #30 align select a market table
* fix: #30 select a market title
* fix: #30 select a market title
* fix: #30 fix any validateDOMnesting issues
* fix: #30 show loading market data
* fix: #30 add list of header columns
* fix: #30 add list of header columns
* fix: #30 small refactoring after review
* fix: #30 update bold undreline class names
* fix: #30 add large-mobile size
* feat: #30 refactor select markets tables to render array of columns
* fix: #30 remove size from select market dialog
* fix: #30 add extra file for columns
* fix: #30 update formtting
* fix: #30 make sure popup closes on same market navigation
* fix: rename market-utils, add calcCandle methods, store market id on select
* fix: useMemo ondata and marketPositionData + orderbook stories fix
* feat: #30 add open volume positions
* fix: add market summary back
* fix: update formatting
* fix: use currentcolor on arrow
* fix: create all markets page
* fix: add overflow-y auto
* fix: enlarge select market to get started dialog
* fix: revert markets container
* fix: use query to fix flickering on position markets
* fix: edit unordered list in tooltips
* fix: fix tooltip table
* fix: fix home.cy.ts
* chore: skip /markets tests
2022-08-11 11:56:35 +00:00
|
|
|
import { TradesContainer } from '@vegaprotocol/trades';
|
2022-08-31 04:35:46 +00:00
|
|
|
import { LayoutPriority } from 'allotment';
|
feat: market list mega dropdown (rich popover) (#889)
* feat: use MarketList query only
* fix: remove Market.ts from index
* feat: 30 refactor dialog, market list, change query
* feat: #30 add indicativeVolume, total fees, tooltip, large dialog, tooltip accepts html description
* fix: #30 total fees display in tooltip
* fix: #30 toggle title on dialog open
* fix: #30 fix order, price, high, low utils
* fix: #30 fix test for market utils
* feat: #30 add popover with markets to select
* feat: #30 storybook popover
* feat: #30 remove border on trigger and add some other classes
* fix: #30 fix format check with format:write
* feat: #30 add tooltip on taker fee
* feat: #30 add tooltip on taker fee
* fix: #30 format on select market list
* fix: #30 remove unknown cast in test mock data
* fix: #30 show markets where you have open positions
* fix: #30 double check if open positions
* fix: #30 dialog has only small/large sizes
* feat: #30 add border on trigger and change padding and no wrap
* fix: #30 if fees or factors are not found
* fix: #30 remove markets.cy tests as markets page is now gone
* fix #30 remove view full market list test
* fix: #30 add rotating arrow on market title
* fix: #30 add ease-in-out on popover
* fix: #30 add ease-in-out on popover
* fix: #30 align select a market table
* fix: #30 select a market title
* fix: #30 select a market title
* fix: #30 fix any validateDOMnesting issues
* fix: #30 show loading market data
* fix: #30 add list of header columns
* fix: #30 add list of header columns
* fix: #30 small refactoring after review
* fix: #30 update bold undreline class names
* fix: #30 add large-mobile size
* feat: #30 refactor select markets tables to render array of columns
* fix: #30 remove size from select market dialog
* fix: #30 add extra file for columns
* fix: #30 update formtting
* fix: #30 make sure popup closes on same market navigation
* fix: rename market-utils, add calcCandle methods, store market id on select
* fix: useMemo ondata and marketPositionData + orderbook stories fix
* feat: #30 add open volume positions
* fix: add market summary back
* fix: update formatting
* fix: use currentcolor on arrow
* fix: create all markets page
* fix: add overflow-y auto
* fix: enlarge select market to get started dialog
* fix: revert markets container
* fix: use query to fix flickering on position markets
* fix: edit unordered list in tooltips
* fix: fix tooltip table
* fix: fix home.cy.ts
* chore: skip /markets tests
2022-08-11 11:56:35 +00:00
|
|
|
import classNames from 'classnames';
|
|
|
|
import AutoSizer from 'react-virtualized-auto-sizer';
|
2022-10-11 12:30:07 +00:00
|
|
|
import { memo, useState } from 'react';
|
2022-11-18 17:08:48 +00:00
|
|
|
import type { ReactNode, ComponentProps } from 'react';
|
2022-04-26 15:26:28 +00:00
|
|
|
import { DepthChartContainer } from '@vegaprotocol/market-depth';
|
2022-04-25 17:34:07 +00:00
|
|
|
import { CandlesChartContainer } from '@vegaprotocol/candles-chart';
|
2022-06-17 14:56:42 +00:00
|
|
|
import {
|
2022-06-24 03:16:01 +00:00
|
|
|
Tab,
|
|
|
|
Tabs,
|
2022-08-31 04:35:46 +00:00
|
|
|
ResizableGrid,
|
|
|
|
ResizableGridPanel,
|
feat: liquidity provisions view (#1133)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* chore: add another wait for market
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-07 11:05:28 +00:00
|
|
|
ButtonLink,
|
|
|
|
Link,
|
2022-11-18 17:08:48 +00:00
|
|
|
Splash,
|
2022-06-17 14:56:42 +00:00
|
|
|
} from '@vegaprotocol/ui-toolkit';
|
2022-10-14 07:09:11 +00:00
|
|
|
import { t } from '@vegaprotocol/react-helpers';
|
feat: liquidity provisions view (#1133)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* chore: add another wait for market
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-07 11:05:28 +00:00
|
|
|
import { useAssetDetailsDialogStore } from '@vegaprotocol/assets';
|
|
|
|
import { useEnvironment } from '@vegaprotocol/environment';
|
2022-09-13 08:19:41 +00:00
|
|
|
import { Header, HeaderStat } from '../../components/header';
|
2022-11-08 07:23:38 +00:00
|
|
|
import { AccountsContainer } from '../../components/accounts-container';
|
2022-10-04 08:37:31 +00:00
|
|
|
import {
|
|
|
|
ColumnKind,
|
|
|
|
SelectMarketPopover,
|
|
|
|
} from '../../components/select-market';
|
|
|
|
import type { OnCellClickHandler } from '../../components/select-market';
|
2022-10-11 12:30:07 +00:00
|
|
|
import type { SingleMarketFieldsFragment } from '@vegaprotocol/market-list';
|
|
|
|
import { Last24hPriceChange } from '../../components/last-24h-price-change';
|
|
|
|
import { MarketMarkPrice } from '../../components/market-mark-price';
|
|
|
|
import { MarketTradingModeComponent } from '../../components/market-trading-mode';
|
2022-10-24 12:16:09 +00:00
|
|
|
import { Last24hVolume } from '../../components/last-24h-volume';
|
Feat/63 Deal ticket (#82)
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* use intent shadow helper
* remove date-fns and format manually, update submit button error to use input-error
* remove stray console.log
2022-03-17 19:35:46 +00:00
|
|
|
|
2022-11-18 17:08:48 +00:00
|
|
|
const NO_MARKET = t('No market');
|
|
|
|
|
|
|
|
type MarketDependantView =
|
|
|
|
| typeof CandlesChartContainer
|
|
|
|
| typeof DepthChartContainer
|
|
|
|
| typeof DealTicketContainer
|
|
|
|
| typeof MarketInfoContainer
|
|
|
|
| typeof OrderbookContainer
|
|
|
|
| typeof TradesContainer;
|
|
|
|
|
|
|
|
type MarketDependantViewProps = ComponentProps<MarketDependantView>;
|
|
|
|
|
|
|
|
const requiresMarket = (View: MarketDependantView) => {
|
|
|
|
const WrappedComponent = (props: MarketDependantViewProps) =>
|
|
|
|
props.marketId ? <View {...props} /> : <Splash>{NO_MARKET}</Splash>;
|
|
|
|
WrappedComponent.displayName = `RequiresMarket(${View.name})`;
|
|
|
|
return WrappedComponent;
|
|
|
|
};
|
|
|
|
|
Feat/63 Deal ticket (#82)
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* use intent shadow helper
* remove date-fns and format manually, update submit button error to use input-error
* remove stray console.log
2022-03-17 19:35:46 +00:00
|
|
|
const TradingViews = {
|
2022-11-18 17:08:48 +00:00
|
|
|
Candles: requiresMarket(CandlesChartContainer),
|
|
|
|
Depth: requiresMarket(DepthChartContainer),
|
|
|
|
Ticket: requiresMarket(DealTicketContainer),
|
|
|
|
Info: requiresMarket(MarketInfoContainer),
|
|
|
|
Orderbook: requiresMarket(OrderbookContainer),
|
|
|
|
Trades: requiresMarket(TradesContainer),
|
2022-07-14 16:03:17 +00:00
|
|
|
Positions: PositionsContainer,
|
|
|
|
Orders: OrderListContainer,
|
|
|
|
Collateral: AccountsContainer,
|
2022-08-19 08:03:31 +00:00
|
|
|
Fills: FillsContainer,
|
Feat/63 Deal ticket (#82)
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* use intent shadow helper
* remove date-fns and format manually, update submit button error to use input-error
* remove stray console.log
2022-03-17 19:35:46 +00:00
|
|
|
};
|
2022-03-02 02:08:42 +00:00
|
|
|
|
2022-03-28 19:34:45 +00:00
|
|
|
type TradingView = keyof typeof TradingViews;
|
|
|
|
|
2022-08-25 14:21:28 +00:00
|
|
|
type ExpiryLabelProps = {
|
2022-11-18 17:08:48 +00:00
|
|
|
market: SingleMarketFieldsFragment | null;
|
2022-08-25 14:21:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const ExpiryLabel = ({ market }: ExpiryLabelProps) => {
|
2022-11-18 17:08:48 +00:00
|
|
|
const content = market ? getExpiryDate(market) : '-';
|
2022-09-13 08:19:41 +00:00
|
|
|
return <div data-testid="trading-expiry">{content}</div>;
|
2022-08-25 14:21:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
type ExpiryTooltipContentProps = {
|
2022-10-11 12:30:07 +00:00
|
|
|
market: SingleMarketFieldsFragment;
|
2022-08-25 14:21:28 +00:00
|
|
|
explorerUrl?: string;
|
|
|
|
};
|
|
|
|
|
|
|
|
const ExpiryTooltipContent = ({
|
|
|
|
market,
|
|
|
|
explorerUrl,
|
|
|
|
}: ExpiryTooltipContentProps) => {
|
2022-11-18 17:08:48 +00:00
|
|
|
if (market?.marketTimestamps.close === null) {
|
2022-08-25 14:21:28 +00:00
|
|
|
const oracleId =
|
|
|
|
market.tradableInstrument.instrument.product
|
2022-11-09 01:05:48 +00:00
|
|
|
.dataSourceSpecForTradingTermination?.id;
|
2022-08-25 14:21:28 +00:00
|
|
|
|
|
|
|
return (
|
2022-10-14 08:15:34 +00:00
|
|
|
<section data-testid="expiry-tool-tip">
|
|
|
|
<p className="mb-2">
|
2022-08-25 14:21:28 +00:00
|
|
|
{t(
|
|
|
|
'This market expires when triggered by its oracle, not on a set date.'
|
|
|
|
)}
|
|
|
|
</p>
|
|
|
|
{explorerUrl && oracleId && (
|
|
|
|
<Link href={`${explorerUrl}/oracles#${oracleId}`} target="_blank">
|
|
|
|
{t('View oracle specification')}
|
|
|
|
</Link>
|
|
|
|
)}
|
2022-10-14 08:15:34 +00:00
|
|
|
</section>
|
2022-08-25 14:21:28 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return null;
|
|
|
|
};
|
|
|
|
|
2022-06-20 23:52:25 +00:00
|
|
|
interface TradeMarketHeaderProps {
|
2022-11-18 17:08:48 +00:00
|
|
|
market: SingleMarketFieldsFragment | null;
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
onSelect: (marketId: string) => void;
|
2022-03-02 02:08:42 +00:00
|
|
|
}
|
|
|
|
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
export const TradeMarketHeader = ({
|
|
|
|
market,
|
|
|
|
onSelect,
|
|
|
|
}: TradeMarketHeaderProps) => {
|
2022-08-25 14:21:28 +00:00
|
|
|
const { VEGA_EXPLORER_URL } = useEnvironment();
|
2022-09-23 13:14:52 +00:00
|
|
|
const { open: openAssetDetailsDialog } = useAssetDetailsDialogStore();
|
2022-09-05 14:25:33 +00:00
|
|
|
|
2022-08-17 14:10:01 +00:00
|
|
|
const symbol =
|
2022-11-18 17:08:48 +00:00
|
|
|
market?.tradableInstrument.instrument.product?.settlementAsset?.symbol;
|
2022-09-05 14:25:33 +00:00
|
|
|
|
2022-09-23 13:14:52 +00:00
|
|
|
const onCellClick: OnCellClickHandler = (e, kind, value) => {
|
|
|
|
if (value && kind === ColumnKind.Asset) {
|
|
|
|
openAssetDetailsDialog(value, e.target as HTMLElement);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2022-06-06 16:19:56 +00:00
|
|
|
return (
|
2022-09-13 08:19:41 +00:00
|
|
|
<Header
|
|
|
|
title={
|
|
|
|
<SelectMarketPopover
|
2022-11-18 17:08:48 +00:00
|
|
|
marketName={market?.tradableInstrument.instrument.name || NO_MARKET}
|
2022-09-13 08:19:41 +00:00
|
|
|
onSelect={onSelect}
|
2022-09-23 13:14:52 +00:00
|
|
|
onCellClick={onCellClick}
|
2022-09-13 08:19:41 +00:00
|
|
|
/>
|
|
|
|
}
|
|
|
|
>
|
|
|
|
<HeaderStat
|
|
|
|
heading={t('Expiry')}
|
|
|
|
description={
|
2022-11-18 17:08:48 +00:00
|
|
|
market && (
|
|
|
|
<ExpiryTooltipContent
|
|
|
|
market={market}
|
|
|
|
explorerUrl={VEGA_EXPLORER_URL}
|
|
|
|
/>
|
|
|
|
)
|
2022-09-13 08:19:41 +00:00
|
|
|
}
|
2022-10-14 08:15:34 +00:00
|
|
|
testId="market-expiry"
|
2022-09-13 08:19:41 +00:00
|
|
|
>
|
|
|
|
<ExpiryLabel market={market} />
|
|
|
|
</HeaderStat>
|
2022-11-18 17:08:48 +00:00
|
|
|
<MarketMarkPrice marketId={market?.id} />
|
|
|
|
<Last24hPriceChange marketId={market?.id} />
|
|
|
|
<Last24hVolume marketId={market?.id} />
|
|
|
|
<MarketTradingModeComponent marketId={market?.id} onSelect={onSelect} />
|
2022-09-13 08:19:41 +00:00
|
|
|
{symbol ? (
|
2022-10-14 08:15:34 +00:00
|
|
|
<HeaderStat
|
|
|
|
heading={t('Settlement asset')}
|
|
|
|
testId="market-settlement-asset"
|
|
|
|
>
|
|
|
|
<div>
|
2022-09-13 08:19:41 +00:00
|
|
|
<ButtonLink
|
2022-09-23 13:14:52 +00:00
|
|
|
onClick={(e) => {
|
|
|
|
openAssetDetailsDialog(symbol, e.target as HTMLElement);
|
2022-09-13 08:19:41 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
{symbol}
|
|
|
|
</ButtonLink>
|
|
|
|
</div>
|
|
|
|
</HeaderStat>
|
|
|
|
) : null}
|
|
|
|
</Header>
|
2022-06-06 16:19:56 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2022-06-20 23:52:25 +00:00
|
|
|
interface TradeGridProps {
|
2022-11-18 17:08:48 +00:00
|
|
|
market: SingleMarketFieldsFragment | null;
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
onSelect: (marketId: string) => void;
|
2022-06-20 23:52:25 +00:00
|
|
|
}
|
|
|
|
|
2022-10-11 12:30:07 +00:00
|
|
|
const MainGrid = ({
|
|
|
|
marketId,
|
|
|
|
onSelect,
|
|
|
|
}: {
|
|
|
|
marketId: string;
|
2022-11-18 17:08:48 +00:00
|
|
|
onSelect?: (marketId: string) => void;
|
2022-10-11 12:30:07 +00:00
|
|
|
}) => (
|
|
|
|
<ResizableGrid vertical>
|
|
|
|
<ResizableGridPanel minSize={75} priority={LayoutPriority.High}>
|
|
|
|
<ResizableGrid proportionalLayout={false} minSize={200}>
|
|
|
|
<ResizableGridPanel
|
|
|
|
priority={LayoutPriority.High}
|
|
|
|
minSize={200}
|
|
|
|
preferredSize="50%"
|
|
|
|
>
|
|
|
|
<TradeGridChild>
|
|
|
|
<Tabs>
|
|
|
|
<Tab id="candles" name={t('Candles')}>
|
|
|
|
<TradingViews.Candles marketId={marketId} />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="depth" name={t('Depth')}>
|
|
|
|
<TradingViews.Depth marketId={marketId} />
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
</TradeGridChild>
|
2022-08-31 04:35:46 +00:00
|
|
|
</ResizableGridPanel>
|
|
|
|
<ResizableGridPanel
|
|
|
|
priority={LayoutPriority.Low}
|
2022-10-11 12:30:07 +00:00
|
|
|
preferredSize={330}
|
|
|
|
minSize={300}
|
2022-08-31 04:35:46 +00:00
|
|
|
>
|
|
|
|
<TradeGridChild>
|
|
|
|
<Tabs>
|
2022-10-11 12:30:07 +00:00
|
|
|
<Tab id="ticket" name={t('Ticket')}>
|
|
|
|
<TradingViews.Ticket marketId={marketId} />
|
2022-08-31 04:35:46 +00:00
|
|
|
</Tab>
|
2022-10-11 12:30:07 +00:00
|
|
|
<Tab id="info" name={t('Info')}>
|
|
|
|
<TradingViews.Info
|
|
|
|
marketId={marketId}
|
|
|
|
onSelect={(id: string) => {
|
2022-11-18 17:08:48 +00:00
|
|
|
onSelect?.(id);
|
2022-10-11 12:30:07 +00:00
|
|
|
}}
|
|
|
|
/>
|
2022-08-31 04:35:46 +00:00
|
|
|
</Tab>
|
2022-10-11 12:30:07 +00:00
|
|
|
</Tabs>
|
|
|
|
</TradeGridChild>
|
|
|
|
</ResizableGridPanel>
|
|
|
|
<ResizableGridPanel
|
|
|
|
priority={LayoutPriority.Low}
|
|
|
|
preferredSize={430}
|
|
|
|
minSize={200}
|
|
|
|
>
|
|
|
|
<TradeGridChild>
|
|
|
|
<Tabs>
|
|
|
|
<Tab id="orderbook" name={t('Orderbook')}>
|
|
|
|
<TradingViews.Orderbook marketId={marketId} />
|
2022-08-31 04:35:46 +00:00
|
|
|
</Tab>
|
2022-10-11 12:30:07 +00:00
|
|
|
<Tab id="trades" name={t('Trades')}>
|
|
|
|
<TradingViews.Trades marketId={marketId} />
|
2022-08-31 04:35:46 +00:00
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
</TradeGridChild>
|
|
|
|
</ResizableGridPanel>
|
|
|
|
</ResizableGrid>
|
2022-10-11 12:30:07 +00:00
|
|
|
</ResizableGridPanel>
|
|
|
|
<ResizableGridPanel
|
|
|
|
priority={LayoutPriority.Low}
|
|
|
|
preferredSize="25%"
|
|
|
|
minSize={50}
|
|
|
|
>
|
|
|
|
<TradeGridChild>
|
|
|
|
<Tabs>
|
|
|
|
<Tab id="positions" name={t('Positions')}>
|
|
|
|
<TradingViews.Positions />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="orders" name={t('Orders')}>
|
|
|
|
<TradingViews.Orders />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="fills" name={t('Fills')}>
|
|
|
|
<TradingViews.Fills />
|
|
|
|
</Tab>
|
|
|
|
<Tab id="accounts" name={t('Collateral')}>
|
|
|
|
<TradingViews.Collateral />
|
|
|
|
</Tab>
|
|
|
|
</Tabs>
|
|
|
|
</TradeGridChild>
|
|
|
|
</ResizableGridPanel>
|
|
|
|
</ResizableGrid>
|
|
|
|
);
|
|
|
|
const MainGridWrapped = memo(MainGrid);
|
|
|
|
|
|
|
|
export const TradeGrid = ({ market, onSelect }: TradeGridProps) => {
|
|
|
|
return (
|
|
|
|
<div className="h-full grid grid-rows-[min-content_1fr]">
|
|
|
|
<TradeMarketHeader market={market} onSelect={onSelect} />
|
2022-11-18 17:08:48 +00:00
|
|
|
<MainGridWrapped marketId={market?.id || ''} onSelect={onSelect} />
|
2022-08-31 04:35:46 +00:00
|
|
|
</div>
|
2022-03-02 02:08:42 +00:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface TradeGridChildProps {
|
|
|
|
children: ReactNode;
|
|
|
|
}
|
|
|
|
|
2022-08-31 04:35:46 +00:00
|
|
|
const TradeGridChild = ({ children }: TradeGridChildProps) => {
|
2022-03-02 02:08:42 +00:00
|
|
|
return (
|
2022-08-31 04:35:46 +00:00
|
|
|
<section className="h-full">
|
2022-03-02 02:08:42 +00:00
|
|
|
<AutoSizer>
|
2022-09-13 08:19:41 +00:00
|
|
|
{({ width, height }) => <div style={{ width, height }}>{children}</div>}
|
2022-03-02 02:08:42 +00:00
|
|
|
</AutoSizer>
|
|
|
|
</section>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
interface TradePanelsProps {
|
2022-11-18 17:08:48 +00:00
|
|
|
market: SingleMarketFieldsFragment | null;
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
onSelect: (marketId: string) => void;
|
2022-03-02 02:08:42 +00:00
|
|
|
}
|
|
|
|
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
export const TradePanels = ({ market, onSelect }: TradePanelsProps) => {
|
2022-04-25 17:34:07 +00:00
|
|
|
const [view, setView] = useState<TradingView>('Candles');
|
2022-03-02 02:08:42 +00:00
|
|
|
|
|
|
|
const renderView = () => {
|
2022-10-11 12:30:07 +00:00
|
|
|
const Component = memo<{
|
|
|
|
marketId: string;
|
|
|
|
onSelect: (marketId: string) => void;
|
|
|
|
}>(TradingViews[view]);
|
2022-03-02 02:08:42 +00:00
|
|
|
|
|
|
|
if (!Component) {
|
|
|
|
throw new Error(`No component for view: ${view}`);
|
|
|
|
}
|
|
|
|
|
2022-11-18 17:08:48 +00:00
|
|
|
if (!market) return <Splash>{NO_MARKET}</Splash>;
|
|
|
|
|
|
|
|
return <Component marketId={market?.id} onSelect={onSelect} />;
|
2022-03-02 02:08:42 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div className="h-full grid grid-rows-[min-content_1fr_min-content]">
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
<TradeMarketHeader market={market} onSelect={onSelect} />
|
2022-03-02 02:08:42 +00:00
|
|
|
<div className="h-full">
|
|
|
|
<AutoSizer>
|
|
|
|
{({ width, height }) => (
|
chore: LP tooltips & move market-info lib (#1267)
* feat(#473): add positions metrics data provider
* feat(#473) add positions stats
* feat(#473) add positions stats
* feat(#473): add positions stats
* feat(#473): add positions stats
* feat(#473): position metrics, test and refactoring
* feat(#473): add unit tests to positions table
* feat(#473): fix spelling, order positions by updated at desc
* feat(#473): protect from division by 0
* feat(#473): fix trading positions e2e tests
* feat(#473): fix e2e data mocks
* feat(#473): post code review clean up
* feat(#993): dependencies handling in data provider
* feat(#993): fix e2e tests data mocks
* feat(#993): remove position metrics mocks, add market data market id
* feat: #994 add price monitoring bounds and candles update interface
* fix: move best bid price to diff section
* feat(#993): add missing mocks, fix combine function
* fix: add insurance pool and calc volume 24h
* feat: display some oracle min info, asset id, insurance pool, move open interest and 24hVol
* fix: add market-info.cy.ts case
* fix: remove # from numbered price monitoring settings
* fix: add insurance pool test
* fix: format 24hvol
* feat(#993): set loading initially to true, add unit tests
* feat(#993): cleanup, add comments
* feat(#993): remove undefined from client type
* fix: remove indicativeVolume and oracleSpecBinding from market info
* feat(#993): cosmetic changes
* fix: add oracleSpecBinding back
* Update libs/deal-ticket/src/components/info-market.tsx
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
* feat: add initial queries
* fix: memo yesterday's timestamp
* fix: add back info
* fix: update query
* fix: add view full oracle details link and update mappings
* fix: regen code, make link reactnode, fix index.ts
* feat: add liquidity lib, refactor info market
* fix: remove liquidity query from deal-ticket
* feat:(#993): pass informaton about update callback cause
* fix: small ui tweaks
* fix: display in grid
* feat: navigate to oracle by termination id
* feat: #491 add use liquidity provision merging
* fix: remove logs, add extra check on my liquidity provision
* fix: type number trivially inferred from a number literal, remove type annotation
* fix: cypress tests and formatting for market info
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: use position decimal places for stake and market value proxy
* fix: #491 use size/position decimal places for obligation, supplied and commitment amount
* fix: add size component and use decimal places
* fix: update readme liquidity
* fix: #491 add correct asset decimal formatters
* Update libs/deal-ticket/src/components/market-info/tooltip-mapping.tsx
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
* fix: make link instead of button to open liquidity
* fix: #491 add liquidity page, link to trading mode tooltip, tabs hidden or choose active
* fix: remove LP dialog, use only link to page
* fix: add market id in LP view
* fix: follow trade grid design
* fix: add one line tabs , remove link styling, remove any, add value formatters
* fix: remove falsy check LP undefined
* fix: keep date formatter in LP table
* fix: add generic type market info, hooks in body function
* fix: revert number formatters
* fix: use one param only in network params query
* fix: use network param in web3 lib
* fix: move lp container to trading app
* fix: remove resizable panel
* feat: add header component, remove isEstimate
* chore: remove unnecessary type cast
* fix: fix build with children map clone element
* chore: lint
* fix: move use network params to react helpers
* fix: add const for LP tabs
* fix: fix formatting on LP page
* fix: only show tilde for liquidity monitoring auction end date
* fix: market id being rendered twice in market info
* chore: fix lint
* fix: types for generate withdraw form query
* chore: fix intermittent failing withdrawal test
* Update libs/deal-ticket/src/components/market-info/info-market.tsx
* fix: route to LP and update selected market
* fix: add market-info lib
* fix: add tooltips to header stat
* fix: add overflow-y on div within auto sizer
* fix: fix merge conflicts
* fix: size and dialog
* fix: format target stake and supplied stake
* fix: add tooltips ag-grid and fix decimals
* fix: overflow on both axes auto-sizer
* fix: remove symbol, add to commitment
* fix: update tooltips and headers after demo
* fix: network switcher background
* fix: remove any from market info
* fix: integration test
* fix: remove e2e test for risk factors for now until grpc error sorted
* fix: get liquidity panel by test-id
* fix: fix market-info.cy.ts test
* fix: liquidity test
* f
ix: fix link data test id
Co-authored-by: Bartłomiej Głownia <bglownia@gmail.com>
Co-authored-by: botond <105208209+notbot00@users.noreply.github.com>
Co-authored-by: candida-d <62548908+candida-d@users.noreply.github.com>
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Joe <joe@vega.xyz>
2022-09-12 09:07:29 +00:00
|
|
|
<div style={{ width, height }} className="overflow-auto">
|
|
|
|
{renderView()}
|
|
|
|
</div>
|
2022-03-02 02:08:42 +00:00
|
|
|
)}
|
|
|
|
</AutoSizer>
|
|
|
|
</div>
|
2022-09-13 08:19:41 +00:00
|
|
|
<div className="flex flex-nowrap overflow-x-auto max-w-full border-t border-default">
|
2022-03-28 19:34:45 +00:00
|
|
|
{Object.keys(TradingViews).map((key) => {
|
2022-03-09 16:59:48 +00:00
|
|
|
const isActive = view === key;
|
2022-08-31 04:35:46 +00:00
|
|
|
const className = classNames('p-4 min-w-[100px] capitalize', {
|
2022-03-09 16:59:48 +00:00
|
|
|
'text-black dark:text-vega-yellow': isActive,
|
2022-08-31 04:35:46 +00:00
|
|
|
'bg-neutral-200 dark:bg-neutral-800': isActive,
|
2022-03-09 16:59:48 +00:00
|
|
|
});
|
2022-03-02 02:08:42 +00:00
|
|
|
return (
|
|
|
|
<button
|
Test/deal ticket tests (#161)
* scaffold dealticket package, remove trading views from react-helpers
* add deal ticket component, add intent utils, expand dialog and form group styles
* add splash component, show market not found message if market doesnt exist
* tidy up error handling
* add handleError method for vega tx hook
* add better testname for provider test, flesh out tests a bit more for deal ticket
* Add unit tests for useVegaTransaction and useOrderSubmit hooks
* add wrapper component for order dialog styles
* add vega styled loader to ui toolkit and use in order dialog
* add title prop to order dialog
* split limit and market tickets into own files
* add button radio component
* revert dialog styles
* move splash component to ui-toolkit, add story
* convert intent to enum
* Make button always type=button unless type prop is passed
* inline filter logic for tif selector
* add date-fns, add datetime to helpers
* add order types to wallet package, make price undefined if order type is market
* use enums in deal ticket logic
* tidy up order state by moving submit and transaction hooks out of deal ticket
* add comment for dialog styles
* remove decimal from price input
* add types package, delete old generated types from trading project
* rename types package to graphql
* update generate command to point to correct locations
* fix use order submit test
* BDD and navigation tests passing
* Remove commented steps
* Steps up to placing order
* Date picker and date-fns update
* Vega connector wallet tests
* Passing up to request sent, updated date picker
* Tests for sell orders and errors
* Update market feature
* Fix failing tests
* Update wallet login
* Readded tx hash assertion and remaining tests
* Add CI wallet import
* Update .github/workflows/cypress.yml
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
* Resolved PR comments
* Fix yaml error
* Attempt to fix failing tests in CI
* Run Cypress in Chrome
* Add reload if public key error displayed
* Fix wallet name
* Add force click and waits
* Increase timeout for deal ticket page
* Removed network list from yaml and using input error id
* Increase timeout to 8 seconds
* Re add deleted test id
Co-authored-by: Matthew Russell <mattrussell36@gmail.com>
Co-authored-by: Dexter Edwards <dexter.edwards93@gmail.com>
2022-04-04 15:11:27 +00:00
|
|
|
data-testid={key}
|
2022-03-28 19:34:45 +00:00
|
|
|
onClick={() => setView(key as TradingView)}
|
2022-03-02 02:08:42 +00:00
|
|
|
className={className}
|
|
|
|
key={key}
|
|
|
|
>
|
|
|
|
{key}
|
|
|
|
</button>
|
|
|
|
);
|
|
|
|
})}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|