From d5341d55e161cf0d8b6a33d3bbe83d73866aefd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20G=C5=82ownia?= Date: Wed, 17 Jan 2024 12:21:30 +0100 Subject: [PATCH] feat: use generated AccountType --- libs/positions/src/lib/__generated__/Positions.ts | 3 +-- libs/types/src/__generated__/types.ts | 3 ++- libs/types/src/global-types-mappings.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/positions/src/lib/__generated__/Positions.ts b/libs/positions/src/lib/__generated__/Positions.ts index 59308efa3..e43a9d2e1 100644 --- a/libs/positions/src/lib/__generated__/Positions.ts +++ b/libs/positions/src/lib/__generated__/Positions.ts @@ -29,7 +29,6 @@ export type EstimatePositionQueryVariables = Types.Exact<{ export type EstimatePositionQuery = { __typename?: 'Query', estimatePosition?: { __typename?: 'PositionEstimate', margin: { __typename?: 'MarginEstimate', worstCase: { __typename?: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string }, bestCase: { __typename?: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string } }, liquidation?: { __typename?: 'LiquidationEstimate', worstCase: { __typename?: 'LiquidationPrice', open_volume_only: string, including_buy_orders: string, including_sell_orders: string }, bestCase: { __typename?: 'LiquidationPrice', open_volume_only: string, including_buy_orders: string, including_sell_orders: string } } | null } | null }; - export const PositionFieldsFragmentDoc = gql` fragment PositionFields on Position { realisedPNL @@ -192,4 +191,4 @@ export function useEstimatePositionLazyQuery(baseOptions?: Apollo.LazyQueryHookO } export type EstimatePositionQueryHookResult = ReturnType; export type EstimatePositionLazyQueryHookResult = ReturnType; -export type EstimatePositionQueryResult = Apollo.QueryResult; +export type EstimatePositionQueryResult = Apollo.QueryResult; \ No newline at end of file diff --git a/libs/types/src/__generated__/types.ts b/libs/types/src/__generated__/types.ts index fe2b1fd1c..5dc4ca91f 100644 --- a/libs/types/src/__generated__/types.ts +++ b/libs/types/src/__generated__/types.ts @@ -80,7 +80,6 @@ export type AccountFilter = { /** The various account types in Vega (used by collateral) */ export enum AccountType { - ACCOUNT_TYPE_ORDER_MARGIN = 'ACCOUNT_TYPE_ORDER_MARGIN', /** Bond - an account use to maintain liquidity commitments */ ACCOUNT_TYPE_BOND = 'ACCOUNT_TYPE_BOND', /** External - an account use to refer to external account */ @@ -114,6 +113,8 @@ export enum AccountType { ACCOUNT_TYPE_MARGIN = 'ACCOUNT_TYPE_MARGIN', /** Network treasury, per-asset treasury controlled by the network */ ACCOUNT_TYPE_NETWORK_TREASURY = 'ACCOUNT_TYPE_NETWORK_TREASURY', + /** Per asset market account for party in isolated margin mode */ + ACCOUNT_TYPE_ORDER_MARGIN = 'ACCOUNT_TYPE_ORDER_MARGIN', /** Holds pending rewards to be paid to the referrer of a party out of fees paid by the taker */ ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD = 'ACCOUNT_TYPE_PENDING_FEE_REFERRAL_REWARD', /** PendingTransfers - a global account for the pending transfers pool */ diff --git a/libs/types/src/global-types-mappings.ts b/libs/types/src/global-types-mappings.ts index a4801271a..7ce958f93 100644 --- a/libs/types/src/global-types-mappings.ts +++ b/libs/types/src/global-types-mappings.ts @@ -38,7 +38,7 @@ import type { ProductType, ProposalProductType } from './product'; export const AccountTypeMapping: { [T in AccountType]: string; } = { - ACCOUNT_TYPE_ORDER_MARGIN: 'Pending order margin', + ACCOUNT_TYPE_ORDER_MARGIN: 'Per asset market account', ACCOUNT_TYPE_BOND: 'Bond account', ACCOUNT_TYPE_EXTERNAL: 'External account', ACCOUNT_TYPE_FEES_INFRASTRUCTURE: 'Infrastructure fees account',