diff --git a/apps/trading-e2e/src/integration/order-book.cy.ts b/apps/trading-e2e/src/integration/order-book.cy.ts index b93ddde6a..98ec1f513 100644 --- a/apps/trading-e2e/src/integration/order-book.cy.ts +++ b/apps/trading-e2e/src/integration/order-book.cy.ts @@ -81,6 +81,12 @@ describe('order book', { tags: '@smoke' }, () => { cy.getByTestId(dealTicketSize).should('have.value', '7'); }); + it('copy size to deal ticket form', () => { + // 6003-ORDB-009 + cy.getByTestId(bidVolume).click(); + cy.getByTestId(dealTicketSize).should('have.value', '1'); + }); + it('change price resolution', () => { // 6003-ORDB-008 const resolutions = [ diff --git a/libs/market-depth/src/lib/orderbook-row.tsx b/libs/market-depth/src/lib/orderbook-row.tsx index 16aed132a..0767e2de2 100644 --- a/libs/market-depth/src/lib/orderbook-row.tsx +++ b/libs/market-depth/src/lib/orderbook-row.tsx @@ -120,8 +120,15 @@ export const OrderbookRow = React.memo( } /> {width >= HIDE_VOL_WIDTH && ( - + onClick && + value && + onClick({ + size: addDecimal(value, positionDecimalPlaces), + }) + } value={value} valueFormatted={addDecimalsFixedFormatNumber( value, diff --git a/libs/market-depth/src/lib/orderbook.tsx b/libs/market-depth/src/lib/orderbook.tsx index a6bcb42ac..e160a9c8b 100644 --- a/libs/market-depth/src/lib/orderbook.tsx +++ b/libs/market-depth/src/lib/orderbook.tsx @@ -1,4 +1,4 @@ -import { useCallback, useMemo, useRef, useState } from 'react'; +import { useMemo, useRef, useState } from 'react'; import ReactVirtualizedAutoSizer from 'react-virtualized-auto-sizer'; import { addDecimalsFormatNumber,