feat(trading): show positions for all markets (#3868)
This commit is contained in:
parent
3aa0e974c2
commit
522eb521b9
@ -130,6 +130,13 @@ export const closedMarketsWithDataProvider = makeDerivedDataProvider<
|
||||
addData(parts[0] as Market[], parts[1] as MarketData[])
|
||||
);
|
||||
|
||||
export const allMarketsWithDataProvider = makeDerivedDataProvider<
|
||||
MarketMaybeWithData[],
|
||||
never
|
||||
>([marketsProvider, marketsDataProvider], (parts) =>
|
||||
addData(parts[0] as Market[], parts[1] as MarketData[])
|
||||
);
|
||||
|
||||
export type MarketMaybeWithDataAndCandles = MarketMaybeWithData &
|
||||
MarketMaybeWithCandles;
|
||||
|
||||
|
@ -14,7 +14,7 @@ import type {
|
||||
MarketMaybeWithData,
|
||||
MarketDataQueryVariables,
|
||||
} from '@vegaprotocol/markets';
|
||||
import { marketsWithDataProvider } from '@vegaprotocol/markets';
|
||||
import { allMarketsWithDataProvider } from '@vegaprotocol/markets';
|
||||
import type {
|
||||
PositionsQuery,
|
||||
PositionFieldsFragment,
|
||||
@ -308,7 +308,8 @@ export const positionsMetricsProvider = makeDerivedDataProvider<
|
||||
[
|
||||
positionsDataProvider,
|
||||
accountsDataProvider,
|
||||
(callback, client) => marketsWithDataProvider(callback, client, undefined),
|
||||
(callback, client) =>
|
||||
allMarketsWithDataProvider(callback, client, undefined),
|
||||
marginsDataProvider,
|
||||
],
|
||||
([positions, accounts, marketsData, margins], variables) => {
|
||||
|
Loading…
Reference in New Issue
Block a user