feat: use generated AccountType

This commit is contained in:
Bartłomiej Głownia
2024-01-22 11:04:11 +01:00
parent 946e7bf2a7
commit d5341d55e1
3 changed files with 4 additions and 4 deletions
+1 -2
View File
@@ -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<typeof useEstimatePositionQuery>;
export type EstimatePositionLazyQueryHookResult = ReturnType<typeof useEstimatePositionLazyQuery>;
export type EstimatePositionQueryResult = Apollo.QueryResult<EstimatePositionQuery, EstimatePositionQueryVariables>;
export type EstimatePositionQueryResult = Apollo.QueryResult<EstimatePositionQuery, EstimatePositionQueryVariables>;
+2 -1
View File
@@ -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 */
+1 -1
View File
@@ -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',