From a68bce9ed10eaf8299a4e12a1a81e95edbb08b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Tue, 29 Mar 2022 13:55:44 +0200 Subject: [PATCH] [#108] replace assign-deep with loadash/merge --- apps/trading/pages/markets/positions.tsx | 4 ++-- libs/positions/src/lib/positions-table.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/trading/pages/markets/positions.tsx b/apps/trading/pages/markets/positions.tsx index 053ee2b09..8339a4cf7 100644 --- a/apps/trading/pages/markets/positions.tsx +++ b/apps/trading/pages/markets/positions.tsx @@ -1,6 +1,6 @@ import { useRef, useCallback, useMemo } from 'react'; import { produce } from 'immer'; -import assign from 'assign-deep'; +import merge from 'lodash/merge'; import { useRouter } from 'next/router'; import { AsyncRenderer } from '../../components/async-renderer'; import { PositionsTable, getRowNodeId } from '@vegaprotocol/positions'; @@ -31,7 +31,7 @@ export const Positions = () => { const updatedData = produce( rowNode.data, (draft: positions_party_positions) => { - assign(draft, delta); + merge(draft, delta); } ); if (updatedData !== rowNode.data) { diff --git a/libs/positions/src/lib/positions-table.tsx b/libs/positions/src/lib/positions-table.tsx index 4d97a79e0..b089746d2 100644 --- a/libs/positions/src/lib/positions-table.tsx +++ b/libs/positions/src/lib/positions-table.tsx @@ -1,7 +1,7 @@ import { forwardRef, useMemo } from 'react'; import type { ValueFormatterParams } from 'ag-grid-community'; import { - PriceCell /*, MarginCell*/, + PriceCell, formatNumber, volumePrefix, addDecimal,