[#108] replace assign-deep with loadash/merge
This commit is contained in:
parent
7e74615bf6
commit
a68bce9ed1
@ -1,6 +1,6 @@
|
|||||||
import { useRef, useCallback, useMemo } from 'react';
|
import { useRef, useCallback, useMemo } from 'react';
|
||||||
import { produce } from 'immer';
|
import { produce } from 'immer';
|
||||||
import assign from 'assign-deep';
|
import merge from 'lodash/merge';
|
||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { AsyncRenderer } from '../../components/async-renderer';
|
import { AsyncRenderer } from '../../components/async-renderer';
|
||||||
import { PositionsTable, getRowNodeId } from '@vegaprotocol/positions';
|
import { PositionsTable, getRowNodeId } from '@vegaprotocol/positions';
|
||||||
@ -31,7 +31,7 @@ export const Positions = () => {
|
|||||||
const updatedData = produce<positions_party_positions>(
|
const updatedData = produce<positions_party_positions>(
|
||||||
rowNode.data,
|
rowNode.data,
|
||||||
(draft: positions_party_positions) => {
|
(draft: positions_party_positions) => {
|
||||||
assign(draft, delta);
|
merge(draft, delta);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
if (updatedData !== rowNode.data) {
|
if (updatedData !== rowNode.data) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { forwardRef, useMemo } from 'react';
|
import { forwardRef, useMemo } from 'react';
|
||||||
import type { ValueFormatterParams } from 'ag-grid-community';
|
import type { ValueFormatterParams } from 'ag-grid-community';
|
||||||
import {
|
import {
|
||||||
PriceCell /*, MarginCell*/,
|
PriceCell,
|
||||||
formatNumber,
|
formatNumber,
|
||||||
volumePrefix,
|
volumePrefix,
|
||||||
addDecimal,
|
addDecimal,
|
||||||
|
Loading…
Reference in New Issue
Block a user