chore(trading): liquidity provision, change query for set flag live on true (#3335)
This commit is contained in:
parent
bd3b557f3d
commit
2bfc3abd15
@ -57,7 +57,7 @@ fragment LiquidityProvisionFields on LiquidityProvision {
|
||||
|
||||
query LiquidityProvisions($marketId: ID!) {
|
||||
market(id: $marketId) {
|
||||
liquidityProvisionsConnection {
|
||||
liquidityProvisionsConnection(live: true) {
|
||||
edges {
|
||||
node {
|
||||
...LiquidityProvisionFields
|
||||
|
@ -1,6 +1,6 @@
|
||||
fragment MarketNode on Market {
|
||||
id
|
||||
liquidityProvisionsConnection {
|
||||
liquidityProvisionsConnection(live: true) {
|
||||
edges {
|
||||
node {
|
||||
commitmentAmount
|
||||
|
@ -138,7 +138,7 @@ export type MarketLpQueryResult = Apollo.QueryResult<MarketLpQuery, MarketLpQuer
|
||||
export const LiquidityProvisionsDocument = gql`
|
||||
query LiquidityProvisions($marketId: ID!) {
|
||||
market(id: $marketId) {
|
||||
liquidityProvisionsConnection {
|
||||
liquidityProvisionsConnection(live: true) {
|
||||
edges {
|
||||
node {
|
||||
...LiquidityProvisionFields
|
||||
@ -290,4 +290,4 @@ export function useLiquidityProviderFeeShareUpdateSubscription(baseOptions: Apol
|
||||
return Apollo.useSubscription<LiquidityProviderFeeShareUpdateSubscription, LiquidityProviderFeeShareUpdateSubscriptionVariables>(LiquidityProviderFeeShareUpdateDocument, options);
|
||||
}
|
||||
export type LiquidityProviderFeeShareUpdateSubscriptionHookResult = ReturnType<typeof useLiquidityProviderFeeShareUpdateSubscription>;
|
||||
export type LiquidityProviderFeeShareUpdateSubscriptionResult = Apollo.SubscriptionResult<LiquidityProviderFeeShareUpdateSubscription>;
|
||||
export type LiquidityProviderFeeShareUpdateSubscriptionResult = Apollo.SubscriptionResult<LiquidityProviderFeeShareUpdateSubscription>;
|
||||
|
@ -13,7 +13,7 @@ export type LiquidityProvisionMarketsQuery = { __typename?: 'Query', marketsConn
|
||||
export const MarketNodeFragmentDoc = gql`
|
||||
fragment MarketNode on Market {
|
||||
id
|
||||
liquidityProvisionsConnection {
|
||||
liquidityProvisionsConnection(live: true) {
|
||||
edges {
|
||||
node {
|
||||
commitmentAmount
|
||||
|
@ -65,23 +65,11 @@ export const liquidityProvisionsDataProvider = makeDataProvider<
|
||||
});
|
||||
},
|
||||
getData: (responseData: LiquidityProvisionsQuery | null) => {
|
||||
// to remove dedupe after core fix https://github.com/vegaprotocol/vega/issues/8043
|
||||
const dedupeArr: string[] = [];
|
||||
return (
|
||||
responseData?.market?.liquidityProvisionsConnection?.edges?.map(
|
||||
(e) => e?.node
|
||||
) ?? []
|
||||
).filter((e) => {
|
||||
if (e) {
|
||||
const id = getId(e);
|
||||
if (dedupeArr.includes(id)) {
|
||||
return false;
|
||||
}
|
||||
dedupeArr.push(id);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}) as LiquidityProvisionFieldsFragment[];
|
||||
).filter((e) => !!e) as LiquidityProvisionFieldsFragment[];
|
||||
},
|
||||
getDelta: (
|
||||
subscriptionData: LiquidityProvisionsUpdateSubscription
|
||||
|
Loading…
Reference in New Issue
Block a user