chore: updated order rejection reason mapping, types regen (1808) (#1845)

This commit is contained in:
Art 2022-10-25 12:07:54 +02:00 committed by GitHub
parent 3bc9d3386b
commit 633c2ae526
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
54 changed files with 238 additions and 209 deletions

View File

@ -12,7 +12,7 @@ export const generateAccounts = (
id: Cypress.env('VEGA_PUBLIC_KEY'),
accounts: [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: null,
@ -22,7 +22,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: {
@ -35,7 +35,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '1000',
market: {
@ -48,7 +48,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '1000',
market: {
@ -61,7 +61,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: null,

View File

@ -23,27 +23,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -64,27 +64,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -103,7 +103,7 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '0',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: null,
takerFeeRewardAccount: null,

View File

@ -19,7 +19,7 @@ export const generatePartyBalance = (
decimals: 5,
__typename: 'Asset',
},
__typename: 'Account',
__typename: 'AccountBalance',
},
{
balance: '100000000',
@ -31,7 +31,7 @@ export const generatePartyBalance = (
decimals: 5,
__typename: 'Asset',
},
__typename: 'Account',
__typename: 'AccountBalance',
},
{
balance: '3412867',
@ -43,7 +43,7 @@ export const generatePartyBalance = (
decimals: 5,
__typename: 'Asset',
},
__typename: 'Account',
__typename: 'AccountBalance',
},
{
balance: '70007',
@ -55,7 +55,7 @@ export const generatePartyBalance = (
decimals: 5,
__typename: 'Asset',
},
__typename: 'Account',
__typename: 'AccountBalance',
},
],
__typename: 'Party',

View File

@ -8,7 +8,7 @@ export const generatePartyMarketData = () => {
balance: '1200000',
asset: { id: 'fBTC', decimals: 5, __typename: 'Asset' },
market: null,
__typename: 'Account',
__typename: 'AccountBalance',
},
],
marginsConnection: { edges: null, __typename: 'MarginConnection' },

View File

@ -8,7 +8,7 @@ export type PartyBalanceQueryQueryVariables = Types.Exact<{
}>;
export type PartyBalanceQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } }> | null } | null };
export type PartyBalanceQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } }> | null } | null };
export const PartyBalanceQueryDocument = gql`

View File

@ -18,7 +18,7 @@ const tDAI: DealTicketMarketFragment['tradableInstrument']['instrument']['produc
const accounts: AccountFragment[] = [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '1000000',
asset: tDAI,

View File

@ -36,7 +36,7 @@ export interface AssetsQuery_assetsConnection_edges_node_infrastructureFeeAccoun
}
export interface AssetsQuery_assetsConnection_edges_node_infrastructureFeeAccount {
__typename: "Account";
__typename: "AccountBalance";
/**
* Account type (General, Margin, etc)
*/
@ -76,7 +76,7 @@ export interface AssetsQuery_assetsConnection_edges_node {
/**
* The infrastructure fee account for this asset
*/
infrastructureFeeAccount: AssetsQuery_assetsConnection_edges_node_infrastructureFeeAccount;
infrastructureFeeAccount: AssetsQuery_assetsConnection_edges_node_infrastructureFeeAccount | null;
}
export interface AssetsQuery_assetsConnection_edges {

View File

@ -6,7 +6,7 @@ const defaultOptions = {} as const;
export type AssetsQueryQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type AssetsQueryQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string }, infrastructureFeeAccount: { __typename?: 'Account', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null } } } | null> | null } | null };
export type AssetsQueryQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string }, infrastructureFeeAccount?: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null } | null } } | null> | null } | null };
export const AssetsQueryDocument = gql`

View File

@ -42,7 +42,7 @@ export interface MarketsQuery_markets_tradableInstrument_instrument_metadata {
}
export interface MarketsQuery_markets_tradableInstrument_instrument_product_settlementAsset_globalRewardPoolAccount {
__typename: "Account";
__typename: "AccountBalance";
/**
* Balance as string - current account balance (approx. as balances can be updated several times per second)
*/
@ -286,7 +286,7 @@ export interface MarketsQuery_markets_accounts_asset {
}
export interface MarketsQuery_markets_accounts {
__typename: "Account";
__typename: "AccountBalance";
/**
* Asset, the 'currency'
*/

View File

@ -6,7 +6,7 @@ const defaultOptions = {} as const;
export type MarketsQueryQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type MarketsQueryQuery = { __typename?: 'Query', markets?: Array<{ __typename?: 'Market', id: string, decimalPlaces: number, tradingMode: Types.MarketTradingMode, state: Types.MarketState, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, id: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', settlementAsset: { __typename?: 'Asset', id: string, name: string, decimals: number, globalRewardPoolAccount?: { __typename?: 'Account', balance: string } | null } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } }, marginCalculator?: { __typename?: 'MarginCalculator', scalingFactors: { __typename?: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: number, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, proposal?: { __typename?: 'Proposal', id?: string | null } | null, accounts?: Array<{ __typename?: 'Account', balance: string, type: Types.AccountType, asset: { __typename?: 'Asset', id: string, name: string } }> | null, data?: { __typename?: 'MarketData', markPrice: string, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, midPrice: string, staticMidPrice: string, timestamp: string, openInterest: string, auctionEnd?: string | null, auctionStart?: string | null, indicativePrice: string, indicativeVolume: string, trigger: Types.AuctionTrigger, extensionTrigger: Types.AuctionTrigger, targetStake?: string | null, suppliedStake?: string | null, marketValueProxy: string, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', auctionExtensionSecs: number, probability: number } }> | null, liquidityProviderFeeShare?: Array<{ __typename?: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename?: 'Party', id: string } }> | null } | null }> | null };
export type MarketsQueryQuery = { __typename?: 'Query', markets?: Array<{ __typename?: 'Market', id: string, decimalPlaces: number, tradingMode: Types.MarketTradingMode, state: Types.MarketState, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, id: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', settlementAsset: { __typename?: 'Asset', id: string, name: string, decimals: number, globalRewardPoolAccount?: { __typename?: 'AccountBalance', balance: string } | null } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } }, marginCalculator?: { __typename?: 'MarginCalculator', scalingFactors: { __typename?: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: number, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, proposal?: { __typename?: 'Proposal', id?: string | null } | null, accounts?: Array<{ __typename?: 'AccountBalance', balance: string, type: Types.AccountType, asset: { __typename?: 'Asset', id: string, name: string } }> | null, data?: { __typename?: 'MarketData', markPrice: string, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, midPrice: string, staticMidPrice: string, timestamp: string, openInterest: string, auctionEnd?: string | null, auctionStart?: string | null, indicativePrice: string, indicativeVolume: string, trigger: Types.AuctionTrigger, extensionTrigger: Types.AuctionTrigger, targetStake?: string | null, suppliedStake?: string | null, marketValueProxy: string, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', auctionExtensionSecs: number, probability: number } }> | null, liquidityProviderFeeShare?: Array<{ __typename?: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename?: 'Party', id: string } }> | null } | null }> | null };
export const MarketsQueryDocument = gql`

View File

@ -8,7 +8,7 @@ export type PartyAssetsQueryQueryVariables = Types.Exact<{
}>;
export type PartyAssetsQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, delegations?: Array<{ __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } }> | null, stake: { __typename?: 'PartyStake', currentStakeAvailable: string }, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } }> | null } | null };
export type PartyAssetsQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, delegations?: Array<{ __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } }> | null, stake: { __typename?: 'PartyStake', currentStakeAvailable: string }, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } }> | null } | null };
export const PartyAssetsQueryDocument = gql`

View File

@ -81,7 +81,7 @@ export interface PartyAssetsQuery_party_accounts_asset {
}
export interface PartyAssetsQuery_party_accounts {
__typename: "Account";
__typename: "AccountBalance";
/**
* Asset, the 'currency'
*/

View File

@ -37,7 +37,7 @@ extend type RewardPerAssetDetail {
totalAmountFormatted: String!
}
extend type Account {
extend type AccountBalance {
"The balance field formatted by the client"
balanceFormatted: String!
}

View File

@ -97,7 +97,7 @@ export interface Delegations_party_accounts_asset {
}
export interface Delegations_party_accounts {
__typename: "Account";
__typename: "AccountBalance";
/**
* Asset, the 'currency'
*/

View File

@ -8,7 +8,7 @@ export type DelegationsQueryVariables = Types.Exact<{
}>;
export type DelegationsQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string }, party?: { __typename?: 'Party', id: string, delegations?: Array<{ __typename?: 'Delegation', amountFormatted: string, amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } }> | null, stake: { __typename?: 'PartyStake', currentStakeAvailable: string, currentStakeAvailableFormatted: string }, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } }> | null } | null };
export type DelegationsQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string }, party?: { __typename?: 'Party', id: string, delegations?: Array<{ __typename?: 'Delegation', amountFormatted: string, amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } }> | null, stake: { __typename?: 'PartyStake', currentStakeAvailable: string, currentStakeAvailableFormatted: string }, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', name: string, id: string, decimals: number, symbol: string, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } }> | null } | null };
export const DelegationsDocument = gql`

View File

@ -32,6 +32,6 @@ extend type RewardPerAssetDetail {
totalAmountFormatted: String!
}
extend type Account {
extend type AccountBalance {
balanceFormatted: String!
}

View File

@ -493,12 +493,13 @@ export interface Proposal_proposal_terms_change_NewAsset_source_ERC20 {
contractAddress: string;
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: string;
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: string;
}
@ -550,12 +551,13 @@ export interface Proposal_proposal_terms_change_UpdateAsset_source {
__typename: "UpdateERC20";
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: string;
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: string;
}

View File

@ -137,12 +137,13 @@ export interface ProposalFields_terms_change_UpdateAsset_source {
__typename: "UpdateERC20";
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: string;
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: string;
}

View File

@ -137,12 +137,13 @@ export interface Proposals_proposalsConnection_edges_node_terms_change_UpdateAss
__typename: "UpdateERC20";
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: string;
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: string;
}

View File

@ -12,7 +12,7 @@ export const generateAccounts = (
id: Cypress.env('VEGA_PUBLIC_KEY'),
accounts: [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: null,
@ -22,7 +22,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: {
@ -35,7 +35,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '1000',
market: {
@ -48,7 +48,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '1000',
market: {
@ -61,7 +61,7 @@ export const generateAccounts = (
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: null,
@ -72,7 +72,7 @@ export const generateAccounts = (
},
// account to withdraw Sepolia tBTC
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '100000000',
market: null,

View File

@ -23,27 +23,27 @@ export const generateAsset = (override?: PartialDeep<AssetQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -74,27 +74,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -115,27 +115,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -154,7 +154,7 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
status: Types.AssetStatus.STATUS_ENABLED,
infrastructureFeeAccount: {
balance: '0',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: null,
takerFeeRewardAccount: null,
@ -183,27 +183,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
quantum: '1',
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},
@ -225,27 +225,27 @@ export const generateAssets = (override?: PartialDeep<AssetsQuery>) => {
quantum: '1',
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
},

View File

@ -36,7 +36,7 @@ export const generateMarketInfoQuery = (
__typename: 'Asset',
},
balance: '0',
__typename: 'Account',
__typename: 'AccountBalance',
},
{
type: AccountType.ACCOUNT_TYPE_FEES_LIQUIDITY,
@ -45,7 +45,7 @@ export const generateMarketInfoQuery = (
__typename: 'Asset',
},
balance: '0',
__typename: 'Account',
__typename: 'AccountBalance',
},
],
fees: {

View File

@ -1,4 +1,4 @@
fragment AccountFields on Account {
fragment AccountFields on AccountBalance {
type
balance
market {

View File

@ -3,14 +3,14 @@ import { Schema as Types } from '@vegaprotocol/types';
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
const defaultOptions = {} as const;
export type AccountFieldsFragment = { __typename?: 'Account', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string } };
export type AccountFieldsFragment = { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string } };
export type AccountsQueryVariables = Types.Exact<{
partyId: Types.Scalars['ID'];
}>;
export type AccountsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string } }> | null } | null };
export type AccountsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string } }> | null } | null };
export type AccountEventsSubscriptionVariables = Types.Exact<{
partyId: Types.Scalars['ID'];
@ -20,7 +20,7 @@ export type AccountEventsSubscriptionVariables = Types.Exact<{
export type AccountEventsSubscription = { __typename?: 'Subscription', accounts: Array<{ __typename?: 'AccountUpdate', type: Types.AccountType, balance: string, assetId: string, marketId?: string | null }> };
export const AccountFieldsFragmentDoc = gql`
fragment AccountFields on Account {
fragment AccountFields on AccountBalance {
type
balance
market {

View File

@ -46,7 +46,7 @@ describe('getId', () => {
const accounts = [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '2781397',
market: {
@ -68,7 +68,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '406922',
market: {
@ -90,7 +90,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '10001000000',
market: null,
@ -102,7 +102,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '1990351587',
market: null,
@ -114,7 +114,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '2996218603',
market: null,
@ -126,7 +126,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '5000593078',
market: null,
@ -138,7 +138,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '4000000000000001006031',
market: null,
@ -177,7 +177,7 @@ const accountResult = [
balance: '5000593078',
breakdown: [
{
__typename: 'Account',
__typename: 'AccountBalance',
asset: {
__typename: 'Asset',
decimals: 5,
@ -217,7 +217,7 @@ const accountResult = [
balance: '2996218603',
breakdown: [
{
__typename: 'Account',
__typename: 'AccountBalance',
asset: {
__typename: 'Asset',
decimals: 5,

View File

@ -27,7 +27,7 @@ function isAccount(
| IterableElement<AccountEventsSubscription['accounts']>
): account is AccountFieldsFragment {
return (
(account as AccountFieldsFragment).__typename === 'Account' ||
(account as AccountFieldsFragment).__typename === 'AccountBalance' ||
Boolean((account as AccountFieldsFragment).asset?.id)
);
}
@ -58,7 +58,7 @@ const update = (
draft[index].balance = delta.balance;
} else {
draft.unshift({
__typename: 'Account',
__typename: 'AccountBalance',
type: delta.type,
balance: delta.balance,
market: delta.marketId ? { id: delta.marketId } : null,

View File

@ -5,7 +5,7 @@ import { getAccountData } from './accounts-data-provider';
import { AccountTable } from './accounts-table';
const singleRow = {
__typename: 'Account',
__typename: 'AccountBalance',
type: Types.AccountType.ACCOUNT_TYPE_MARGIN,
balance: '125600000',
market: {
@ -80,7 +80,7 @@ it('should get correct account data', () => {
balance: '0',
breakdown: [
{
__typename: 'Account',
__typename: 'AccountBalance',
asset: {
__typename: 'Asset',
decimals: 5,

View File

@ -16,7 +16,7 @@ export const Primary = Template.bind({});
Primary.args = {
data: getAccountData([
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '2781397',
market: {
@ -38,7 +38,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '406922',
market: {
@ -60,7 +60,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '10001000000',
market: null,
@ -72,7 +72,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '1990351587',
market: null,
@ -84,7 +84,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '2996218603',
market: null,
@ -96,7 +96,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '5000593078',
market: null,
@ -108,7 +108,7 @@ Primary.args = {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '4000000000000001006031',
market: null,

View File

@ -5,7 +5,7 @@ import type { AccountFields } from './accounts-data-provider';
import { getAccountData } from './accounts-data-provider';
const singleRow = {
__typename: 'Account',
__typename: 'AccountBalance',
type: Types.AccountType.ACCOUNT_TYPE_MARGIN,
balance: '125600000',
market: {
@ -74,7 +74,7 @@ describe('BreakdownTable', () => {
balance: '0',
breakdown: [
{
__typename: 'Account',
__typename: 'AccountBalance',
asset: {
__typename: 'Asset',
decimals: 5,

View File

@ -3,14 +3,14 @@ import { Schema as Types } from '@vegaprotocol/types';
import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
const defaultOptions = {} as const;
export type AssetFieldsFragment = { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount: { __typename?: 'Account', balance: string }, globalRewardPoolAccount?: { __typename?: 'Account', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'Account', balance: string } | null };
export type AssetFieldsFragment = { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount?: { __typename?: 'AccountBalance', balance: string } | null, globalRewardPoolAccount?: { __typename?: 'AccountBalance', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null };
export type AssetQueryVariables = Types.Exact<{
assetId: Types.Scalars['ID'];
}>;
export type AssetQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount: { __typename?: 'Account', balance: string }, globalRewardPoolAccount?: { __typename?: 'Account', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'Account', balance: string } | null } } | null> | null } | null };
export type AssetQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount?: { __typename?: 'AccountBalance', balance: string } | null, globalRewardPoolAccount?: { __typename?: 'AccountBalance', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null } } | null> | null } | null };
export const AssetFieldsFragmentDoc = gql`
fragment AssetFields on Asset {

View File

@ -7,7 +7,7 @@ const defaultOptions = {} as const;
export type AssetsQueryVariables = Types.Exact<{ [key: string]: never; }>;
export type AssetsQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount: { __typename?: 'Account', balance: string }, globalRewardPoolAccount?: { __typename?: 'Account', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'Account', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'Account', balance: string } | null } } | null> | null } | null };
export type AssetsQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string }, infrastructureFeeAccount?: { __typename?: 'AccountBalance', balance: string } | null, globalRewardPoolAccount?: { __typename?: 'AccountBalance', balance: string } | null, takerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, makerFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, lpFeeRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null, marketProposerRewardAccount?: { __typename?: 'AccountBalance', balance: string } | null } } | null> | null } | null };
export const AssetsDocument = gql`

View File

@ -129,7 +129,7 @@ export const rows: Rows = [
key: AssetDetail.INFRASTRUCTURE_FEE_ACCOUNT_BALANCE,
label: t('Infrastructure fee account balance'),
tooltip: t('The infrastructure fee account in this asset'),
value: (asset) => num(asset, asset.infrastructureFeeAccount.balance),
value: (asset) => num(asset, asset.infrastructureFeeAccount?.balance),
},
{
key: AssetDetail.GLOBAL_REWARD_POOL_ACCOUNT_BALANCE,

View File

@ -16,27 +16,27 @@ export const generateERC20Asset = (i: number, status: AssetStatus): Asset => ({
status: status,
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
});
@ -57,7 +57,7 @@ export const generateBuiltinAsset = (
status: status,
infrastructureFeeAccount: {
balance: '0',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: null,
takerFeeRewardAccount: null,

View File

@ -6,7 +6,7 @@ query PartyBalance($partyId: ID!) {
}
}
fragment Account on Account {
fragment Account on AccountBalance {
type
balance
asset {

View File

@ -8,7 +8,7 @@ export type MarketPositionsQueryVariables = Types.Exact<{
}>;
export type MarketPositionsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', decimals: number }, market?: { __typename?: 'Market', id: string } | null }> | null, positionsConnection?: { __typename?: 'PositionConnection', edges?: Array<{ __typename?: 'PositionEdge', node: { __typename?: 'Position', openVolume: string, market: { __typename?: 'Market', id: string } } }> | null } | null } | null };
export type MarketPositionsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', decimals: number }, market?: { __typename?: 'Market', id: string } | null }> | null, positionsConnection?: { __typename?: 'PositionConnection', edges?: Array<{ __typename?: 'PositionEdge', node: { __typename?: 'Position', openVolume: string, market: { __typename?: 'Market', id: string } } }> | null } | null } | null };
export const MarketPositionsDocument = gql`

View File

@ -8,12 +8,12 @@ export type PartyBalanceQueryVariables = Types.Exact<{
}>;
export type PartyBalanceQuery = { __typename?: 'Query', party?: { __typename?: 'Party', accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } }> | null } | null };
export type PartyBalanceQuery = { __typename?: 'Query', party?: { __typename?: 'Party', accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } }> | null } | null };
export type AccountFragment = { __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } };
export type AccountFragment = { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number } };
export const AccountFragmentDoc = gql`
fragment Account on Account {
fragment Account on AccountBalance {
type
balance
asset {

View File

@ -8,7 +8,7 @@ export type PartyMarketDataQueryVariables = Types.Exact<{
}>;
export type PartyMarketDataQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, decimals: number }, market?: { __typename?: 'Market', id: string } | null }> | null, marginsConnection?: { __typename?: 'MarginConnection', edges?: Array<{ __typename?: 'MarginEdge', node: { __typename?: 'MarginLevels', initialLevel: string, maintenanceLevel: string, searchLevel: string, market: { __typename?: 'Market', id: string } } }> | null } | null } | null };
export type PartyMarketDataQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, decimals: number }, market?: { __typename?: 'Market', id: string } | null }> | null, marginsConnection?: { __typename?: 'MarginConnection', edges?: Array<{ __typename?: 'MarginEdge', node: { __typename?: 'MarginLevels', initialLevel: string, maintenanceLevel: string, searchLevel: string, market: { __typename?: 'Market', id: string } } }> | null } | null } | null };
export const PartyMarketDataDocument = gql`

View File

@ -14,7 +14,7 @@ const defaultMockMarketPositions = {
let mockMarketPositions: PositionMargin | null = defaultMockMarketPositions;
const mockAccount: Account = {
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '200000',
asset: {

View File

@ -7,7 +7,7 @@ describe('useSettlementAccount Hook', () => {
it('should filter accounts by settlementAssetId', () => {
const accounts: Account[] = [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '2000000000000000000000',
asset: {
@ -19,7 +19,7 @@ describe('useSettlementAccount Hook', () => {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '1000000000',
asset: {
@ -31,7 +31,7 @@ describe('useSettlementAccount Hook', () => {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
balance: '5000000000000000000',
asset: {
@ -43,7 +43,7 @@ describe('useSettlementAccount Hook', () => {
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
balance: '5000000000000000000',
asset: {

View File

@ -17,7 +17,7 @@ export type DepositEventSubscriptionVariables = Types.Exact<{
}>;
export type DepositEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', event: { __typename?: 'Account' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: string, creditedTimestamp?: string | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export type DepositEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', event: { __typename?: 'AccountEvent' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: string, creditedTimestamp?: string | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export const DepositFieldsFragmentDoc = gql`
fragment DepositFields on Deposit {

View File

@ -27,7 +27,7 @@ function generateAsset(): AssetFieldsFragment {
},
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
};
}

View File

@ -10,7 +10,7 @@ export type ProposalEventSubscriptionVariables = Types.Exact<{
}>;
export type ProposalEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'Account' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export type ProposalEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'AccountEvent' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export const ProposalEventFieldsFragmentDoc = gql`
fragment ProposalEventFields on Proposal {

View File

@ -10,14 +10,14 @@ export type MarketLpQueryVariables = Types.Exact<{
export type MarketLpQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', code: string, name: string, product: { __typename?: 'Future', settlementAsset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } } } }, data?: { __typename?: 'MarketData', suppliedStake?: string | null, openInterest: string, targetStake?: string | null, marketValueProxy: string, market: { __typename?: 'Market', id: string } } | null } | null };
export type LiquidityProvisionFieldsFragment = { __typename?: 'LiquidityProvision', createdAt: string, updatedAt?: string | null, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus, party: { __typename?: 'Party', id: string, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'Account', type: Types.AccountType, balance: string } } | null> | null } | null } };
export type LiquidityProvisionFieldsFragment = { __typename?: 'LiquidityProvision', createdAt: string, updatedAt?: string | null, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus, party: { __typename?: 'Party', id: string, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string } } | null> | null } | null } };
export type LiquidityProvisionsQueryVariables = Types.Exact<{
marketId: Types.Scalars['ID'];
}>;
export type LiquidityProvisionsQuery = { __typename?: 'Query', market?: { __typename?: 'Market', liquidityProvisionsConnection?: { __typename?: 'LiquidityProvisionsConnection', edges?: Array<{ __typename?: 'LiquidityProvisionsEdge', node: { __typename?: 'LiquidityProvision', createdAt: string, updatedAt?: string | null, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus, party: { __typename?: 'Party', id: string, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'Account', type: Types.AccountType, balance: string } } | null> | null } | null } } } | null> | null } | null } | null };
export type LiquidityProvisionsQuery = { __typename?: 'Query', market?: { __typename?: 'Market', liquidityProvisionsConnection?: { __typename?: 'LiquidityProvisionsConnection', edges?: Array<{ __typename?: 'LiquidityProvisionsEdge', node: { __typename?: 'LiquidityProvision', createdAt: string, updatedAt?: string | null, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus, party: { __typename?: 'Party', id: string, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string } } | null> | null } | null } } } | null> | null } | null } | null };
export type LiquidityProvisionsUpdateSubscriptionVariables = Types.Exact<{
partyId?: Types.InputMaybe<Types.Scalars['ID']>;

View File

@ -10,7 +10,7 @@ export type MarketInfoQueryVariables = Types.Exact<{
}>;
export type MarketInfoQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename?: 'MarketTimestamps', open?: string | null, close?: string | null }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string } }> | null, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, riskFactors?: { __typename?: 'RiskFactor', market: string, short: string, long: string } | null, data?: { __typename?: 'MarketData', markPrice: string, bestBidVolume: string, bestOfferVolume: string, bestStaticBidVolume: string, bestStaticOfferVolume: string, bestBidPrice: string, bestOfferPrice: string, trigger: Types.AuctionTrigger, openInterest: string, suppliedStake?: string | null, targetStake?: string | null, marketValueProxy: string, market: { __typename?: 'Market', id: string }, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null } | null, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: number, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, candlesConnection?: { __typename?: 'CandleDataConnection', edges?: Array<{ __typename?: 'CandleEdge', node: { __typename?: 'Candle', volume: string } } | null> | null } | null, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, oracleSpecForSettlementData: { __typename?: 'OracleSpec', id: string }, oracleSpecForTradingTermination: { __typename?: 'OracleSpec', id: string }, oracleSpecBinding: { __typename?: 'OracleSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } } }, depth: { __typename?: 'MarketDepth', lastTrade?: { __typename?: 'Trade', price: string } | null } } | null };
export type MarketInfoQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename?: 'MarketTimestamps', open?: string | null, close?: string | null }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string } }> | null, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, priceMonitoringSettings: { __typename?: 'PriceMonitoringSettings', parameters?: { __typename?: 'PriceMonitoringParameters', triggers?: Array<{ __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number }> | null } | null }, riskFactors?: { __typename?: 'RiskFactor', market: string, short: string, long: string } | null, data?: { __typename?: 'MarketData', markPrice: string, bestBidVolume: string, bestOfferVolume: string, bestStaticBidVolume: string, bestStaticOfferVolume: string, bestBidPrice: string, bestOfferPrice: string, trigger: Types.AuctionTrigger, openInterest: string, suppliedStake?: string | null, targetStake?: string | null, marketValueProxy: string, market: { __typename?: 'Market', id: string }, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null } | null, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: number, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, candlesConnection?: { __typename?: 'CandleDataConnection', edges?: Array<{ __typename?: 'CandleEdge', node: { __typename?: 'Candle', volume: string } } | null> | null } | null, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, metadata: { __typename?: 'InstrumentMetadata', tags?: Array<string> | null }, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, oracleSpecForSettlementData: { __typename?: 'OracleSpec', id: string }, oracleSpecForTradingTermination: { __typename?: 'OracleSpec', id: string }, oracleSpecBinding: { __typename?: 'OracleSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } }, riskModel: { __typename?: 'LogNormalRiskModel', tau: number, riskAversionParameter: number, params: { __typename?: 'LogNormalModelParams', r: number, sigma: number, mu: number } } | { __typename?: 'SimpleRiskModel', params: { __typename?: 'SimpleRiskModelParams', factorLong: number, factorShort: number } } }, depth: { __typename?: 'MarketDepth', lastTrade?: { __typename?: 'Trade', price: string } | null } } | null };
export const MarketInfoDocument = gql`

View File

@ -10,7 +10,7 @@ export type OrderEventSubscriptionVariables = Types.Exact<{
}>;
export type OrderEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'Account' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: string, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: string | null, side: Types.Side, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string } } } } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export type OrderEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'AccountEvent' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: string, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: string | null, side: Types.Side, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string } } } } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export const OrderEventFieldsFragmentDoc = gql`
fragment OrderEventFields on Order {

View File

@ -6,7 +6,7 @@ import { getMetrics, rejoinPositionData } from './positions-data-providers';
const accounts = [
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_GENERAL,
asset: {
__typename: 'Asset',
@ -18,7 +18,7 @@ const accounts = [
market: null,
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
asset: {
__typename: 'Asset',
@ -40,7 +40,7 @@ const accounts = [
},
},
{
__typename: 'Account',
__typename: 'AccountBalance',
type: AccountType.ACCOUNT_TYPE_MARGIN,
asset: {
__typename: 'Asset',

View File

@ -55,18 +55,6 @@ export enum ConditionOperator {
OPERATOR_LESS_THAN_OR_EQUAL = "OPERATOR_LESS_THAN_OR_EQUAL",
}
/**
* Status of a liquidity provision order
*/
export enum LiquidityProvisionStatus {
STATUS_ACTIVE = "STATUS_ACTIVE",
STATUS_CANCELLED = "STATUS_CANCELLED",
STATUS_PENDING = "STATUS_PENDING",
STATUS_REJECTED = "STATUS_REJECTED",
STATUS_STOPPED = "STATUS_STOPPED",
STATUS_UNDEPLOYED = "STATUS_UNDEPLOYED",
}
/**
* The current state of a market
*/

View File

@ -15,8 +15,8 @@ export type Scalars = {
};
/** An account record */
export type Account = {
__typename?: 'Account';
export type AccountBalance = {
__typename?: 'AccountBalance';
/** Asset, the 'currency' */
asset: Asset;
/** Balance as string - current account balance (approx. as balances can be updated several times per second) */
@ -50,11 +50,25 @@ export type AccountEdge = {
/** Cursor identifying the account */
cursor: Scalars['String'];
/** The account */
node: Account;
node: AccountBalance;
};
/** An account record */
export type AccountEvent = {
__typename?: 'AccountEvent';
/** Asset, the 'currency' */
asset: Asset;
/** Balance as string - current account balance (approx. as balances can be updated several times per second) */
balance: Scalars['String'];
/** Market (only relevant to margin accounts) */
market?: Maybe<Market>;
/** Owner of the account */
party?: Maybe<Party>;
/** Account type (General, Margin, etc) */
type: AccountType;
};
export enum AccountField {
AccountId = 'AccountId',
AccountType = 'AccountType',
AssetId = 'AssetId',
MarketId = 'MarketId',
@ -136,8 +150,6 @@ export type AccountsConnection = {
export type AggregatedBalance = {
__typename?: 'AggregatedBalance';
/** Account identifier, if query was grouped by account - else null */
accountId?: Maybe<Scalars['ID']>;
/** Account type, if query was grouped by account type - else null */
accountType?: Maybe<AccountType>;
/** Asset identifier, if query was grouped by asset - else null */
@ -146,7 +158,7 @@ export type AggregatedBalance = {
balance: Scalars['String'];
/** Market identifier, if query was grouped by market - else null */
marketId?: Maybe<Scalars['ID']>;
/** Party identifier, if query was grouped by party - else null */
/** Account identifier, if query was grouped by account - else null */
partyId?: Maybe<Scalars['ID']>;
/** RFC3339Nano time from at which this balance was relevant */
timestamp: Scalars['Timestamp'];
@ -171,7 +183,6 @@ export type AggregatedLedgerEntries = {
accountType?: Maybe<AccountType>;
/** Asset identifier, if query was grouped by asset - else null */
assetId?: Maybe<Scalars['ID']>;
id?: Maybe<Scalars['ID']>;
/** Market identifier, if query was grouped by market - else null */
marketId?: Maybe<Scalars['ID']>;
/** Party identifier, if query was grouped by party - else null */
@ -201,17 +212,17 @@ export type Asset = {
/** The precision of the asset. Should match the decimal precision of the asset on its native chain, e.g: for ERC20 assets, it is often 18 */
decimals: Scalars['Int'];
/** The global reward pool account for this asset */
globalRewardPoolAccount?: Maybe<Account>;
globalRewardPoolAccount?: Maybe<AccountBalance>;
/** The ID of the asset */
id: Scalars['ID'];
/** The infrastructure fee account for this asset */
infrastructureFeeAccount: Account;
infrastructureFeeAccount?: Maybe<AccountBalance>;
/** The liquidity provision reward account for this asset */
lpFeeRewardAccount?: Maybe<Account>;
lpFeeRewardAccount?: Maybe<AccountBalance>;
/** The maker fee reward account for this asset */
makerFeeRewardAccount?: Maybe<Account>;
makerFeeRewardAccount?: Maybe<AccountBalance>;
/** The market proposer reward account for this asset */
marketProposerRewardAccount?: Maybe<Account>;
marketProposerRewardAccount?: Maybe<AccountBalance>;
/** The full name of the asset (e.g: Great British Pound) */
name: Scalars['String'];
/** The minimum economically meaningful amount in the asset */
@ -223,7 +234,7 @@ export type Asset = {
/** The symbol of the asset (e.g: GBP) */
symbol: Scalars['String'];
/** The taker fee reward account for this asset */
takerFeeRewardAccount?: Maybe<Account>;
takerFeeRewardAccount?: Maybe<AccountBalance>;
};
/** Edge type containing the asset and cursor information returned by a AssetsConnection */
@ -586,12 +597,13 @@ export type ERC20 = {
contractAddress: Scalars['String'];
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: Scalars['String'];
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: Scalars['String'];
};
@ -841,7 +853,7 @@ export type EthereumKeyRotationsConnection = {
};
/** Union type for wrapped events in stream PROPOSAL is mapped to governance data, something to keep in mind */
export type Event = Account | Asset | AuctionEvent | Deposit | LiquidityProvision | LossSocialization | MarginLevels | Market | MarketData | MarketEvent | MarketTick | NodeSignature | OracleSpec | Order | Party | PositionResolution | Proposal | RiskFactor | SettleDistressed | SettlePosition | TimeUpdate | Trade | TransactionResult | TransferResponses | Vote | Withdrawal;
export type Event = AccountEvent | Asset | AuctionEvent | Deposit | LiquidityProvision | LossSocialization | MarginLevels | Market | MarketData | MarketEvent | MarketTick | NodeSignature | OracleSpec | Order | Party | PositionResolution | Proposal | RiskFactor | SettleDistressed | SettlePosition | TimeUpdate | Trade | TransactionResult | TransferResponses | Vote | Withdrawal;
/** The factors applied to calculate the fees */
export type FeeFactors = {
@ -917,6 +929,19 @@ export type GroupOptions = {
ByLedgerEntryField?: InputMaybe<Array<InputMaybe<LedgerEntryField>>>;
};
/** A segment of datanode history */
export type HistorySegment = {
__typename?: 'HistorySegment';
/** Chain ID of the history segment */
chainID: Scalars['String'];
/** From block height of the history segment */
fromHeight: Scalars['Int'];
/** ID of the history segment */
historySegmentId: Scalars['String'];
/** To block height of the history segment */
toHeight: Scalars['Int'];
};
/** Describes something that can be traded on Vega */
export type Instrument = {
__typename?: 'Instrument';
@ -1016,8 +1041,8 @@ export enum LedgerEntryField {
/** Filter for historical entry ledger queries */
export type LedgerEntryFilter = {
AccountFromFilters?: InputMaybe<Array<InputMaybe<AccountFilter>>>;
AccountToFilters?: InputMaybe<Array<InputMaybe<AccountFilter>>>;
AccountFromFilter?: InputMaybe<AccountFilter>;
AccountToFilter?: InputMaybe<AccountFilter>;
CloseOnAccountFilters?: InputMaybe<Scalars['Boolean']>;
TransferTypes?: InputMaybe<Array<InputMaybe<TransferType>>>;
};
@ -1262,7 +1287,7 @@ export type Market = {
* Get account for a party or market
* @deprecated Use the accountsConnection instead
*/
accounts?: Maybe<Array<Account>>;
accounts?: Maybe<Array<AccountBalance>>;
/** Get account for a party or market */
accountsConnection?: Maybe<AccountsConnection>;
/** Candles on a market, for the 'last' n candles, at 'interval' seconds as specified by parameters using cursor based pagination */
@ -2243,6 +2268,8 @@ export enum OrderRejectionReason {
ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT = 'ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT',
/** Cannot send FOK orders during an auction */
ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION = 'ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION',
/** Good for Normal order received during an auction */
ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION = 'ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION',
/** Cannot send IOC orders during an auction */
ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION = 'ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION',
/** Edit is not allowed */
@ -2250,9 +2277,7 @@ export enum OrderRejectionReason {
/** Attempt to amend expiry time to a value before time order was created */
ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT = 'ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT',
/** Good for Auction order received during continuous trading */
ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING = 'ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING',
/** Good for Normal order received during an auction */
ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION = 'ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION',
ORDER_ERROR_GFA_CANNOT_SEND_ORDER_DURING_CONTINUOUS_TRADING = 'ORDER_ERROR_GFA_CANNOT_SEND_ORDER_DURING_CONTINUOUS_TRADING',
/** Insufficient balance to submit the order (no deposit made) */
ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE = 'ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE',
/** Insufficient funds to pay fees */
@ -2442,7 +2467,7 @@ export type Party = {
* Collateral accounts relating to a party
* @deprecated Use accountsConnection instead
*/
accounts?: Maybe<Array<Account>>;
accounts?: Maybe<Array<AccountBalance>>;
/** Collateral accounts relating to a party */
accountsConnection?: Maybe<AccountsConnection>;
/** @deprecated Use delegationsConnection instead */
@ -3198,6 +3223,12 @@ export type ProposalsConnection = {
pageInfo: PageInfo;
};
/** Indicator showing whether the data-node is ready for the protocol upgrade to begin. */
export type ProtocolUpgradeStatus = {
__typename?: 'ProtocolUpgradeStatus';
ready: Scalars['Boolean'];
};
/** Queries allow a caller to read data and filter data via GraphQL. */
export type Query = {
__typename?: 'Query';
@ -3210,6 +3241,8 @@ export type Query = {
assets?: Maybe<Array<Asset>>;
/** The list of all assets in use in the Vega network or the specified asset if ID is provided */
assetsConnection?: Maybe<AssetsConnection>;
/** Get historical balances for an account within the given date range */
balanceChanges: AggregatedBalanceConnection;
/** Find a deposit using its ID */
deposit?: Maybe<Deposit>;
/** Fetch all deposits */
@ -3237,8 +3270,6 @@ export type Query = {
getMarketDataHistoryByID?: Maybe<Array<Maybe<MarketData>>>;
/** Get market data history for a specific market. If no dates are given, the latest snapshot will be returned. If only the start date is provided all history from the given date will be provided, and if only the end date is provided, all history from the start up to and including the end date will be provided. Pagination is provided using a cursor based pagination model */
getMarketDataHistoryConnectionByID?: Maybe<MarketDataConnection>;
/** Get historical balances for an account or specific asset within the given date range. */
historicBalances: AggregatedBalanceConnection;
/**
* Query for historic key rotations
* @deprecated use keyRotationsConnection instead
@ -3259,6 +3290,8 @@ export type Query = {
markets?: Maybe<Array<Market>>;
/** One or more instruments that are trading on the Vega network */
marketsConnection?: Maybe<MarketConnection>;
/** The most recent history segment */
mostRecentHistorySegment: HistorySegment;
/** Current network limits */
networkLimits?: Maybe<NetworkLimits>;
/** Return a single network parameter */
@ -3360,6 +3393,8 @@ export type Query = {
proposals?: Maybe<Array<Proposal>>;
/** All governance proposals in the Vega network */
proposalsConnection?: Maybe<ProposalsConnection>;
/** Flag indicating whether the data-node is ready to begin the protocol upgrade */
protocolUpgradeStatus?: Maybe<ProtocolUpgradeStatus>;
/** Get statistics about the Vega node */
statistics: Statistics;
/**
@ -3394,6 +3429,14 @@ export type QueryassetsConnectionArgs = {
};
/** Queries allow a caller to read data and filter data via GraphQL. */
export type QuerybalanceChangesArgs = {
dateRange?: InputMaybe<DateRange>;
filter?: InputMaybe<AccountFilter>;
pagination?: InputMaybe<Pagination>;
};
/** Queries allow a caller to read data and filter data via GraphQL. */
export type QuerydepositArgs = {
id: Scalars['ID'];
@ -3488,15 +3531,6 @@ export type QuerygetMarketDataHistoryConnectionByIDArgs = {
};
/** Queries allow a caller to read data and filter data via GraphQL. */
export type QueryhistoricBalancesArgs = {
dateRange?: InputMaybe<DateRange>;
filter?: InputMaybe<AccountFilter>;
groupBy?: InputMaybe<Array<InputMaybe<AccountField>>>;
pagination?: InputMaybe<Pagination>;
};
/** Queries allow a caller to read data and filter data via GraphQL. */
export type QuerykeyRotationsArgs = {
id?: InputMaybe<Scalars['ID']>;
@ -4422,6 +4456,8 @@ export type Transfer = {
id: Scalars['ID'];
/** The type of transfer being made, i.e. a one-off or recurring transfer */
kind: TransferKind;
/** An optional reason explaining the status of the transfer */
reason?: Maybe<Scalars['String']>;
/** An optional reference */
reference?: Maybe<Scalars['String']>;
/** The status of this transfer */
@ -4543,12 +4579,13 @@ export type UpdateERC20 = {
__typename?: 'UpdateERC20';
/**
* The lifetime limits deposit per address
* Note: this is a temporary measure for alpha mainnet
* Note: this is a temporary measure that can be changed by governance
*/
lifetimeLimit: Scalars['String'];
/**
* The maximum allowed per withdrawal
* Note: this is a temporary measure for alpha mainnet
* The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
* Theres no limit on the size of a withdrawal
* Note: this is a temporary measure that can be changed by governance
*/
withdrawThreshold: Scalars['String'];
};

View File

@ -110,11 +110,11 @@ export enum OrderRejectionReasonMapping {
ORDER_ERROR_CANNOT_AMEND_TO_GTT_WITHOUT_EXPIRYAT = 'Cannot amend to GTT without expiry time specified',
ORDER_ERROR_CANNOT_HAVE_GTC_AND_EXPIRYAT = 'Cannot have GTC and expiry time specified',
ORDER_ERROR_CANNOT_SEND_FOK_ORDER_DURING_AUCTION = 'Cannot send FOK order during auction',
ORDER_ERROR_CANNOT_SEND_GFN_ORDER_DURING_AN_AUCTION = 'Cannot send GFN order during auction',
ORDER_ERROR_CANNOT_SEND_IOC_ORDER_DURING_AUCTION = 'Cannot send IOC order during auction',
ORDER_ERROR_EDIT_NOT_ALLOWED = 'Edit not allowed',
ORDER_ERROR_EXPIRYAT_BEFORE_CREATEDAT = 'Expiry time before creation time',
ORDER_ERROR_GFA_ORDER_DURING_CONTINUOUS_TRADING = 'GFA order during continuous trading',
ORDER_ERROR_GFN_ORDER_DURING_AN_AUCTION = 'GFN order during an auction',
ORDER_ERROR_GFA_CANNOT_SEND_ORDER_DURING_CONTINUOUS_TRADING = 'Cannot send GFA order during continuous trading',
ORDER_ERROR_INSUFFICIENT_ASSET_BALANCE = 'Insufficient asset balance',
ORDER_ERROR_INSUFFICIENT_FUNDS_TO_PAY_FEES = 'Insufficient funds to pay fees',
ORDER_ERROR_INTERNAL_ERROR = 'Internal error',

View File

@ -8,7 +8,7 @@ export type TransactionEventSubscriptionVariables = Types.Exact<{
}>;
export type TransactionEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'Account' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult', partyId: string, hash: string, status: boolean, error?: string | null } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export type TransactionEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', type: Types.BusEventType, event: { __typename?: 'AccountEvent' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult', partyId: string, hash: string, status: boolean, error?: string | null } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal' } }> | null };
export const TransactionEventDocument = gql`

View File

@ -10,7 +10,7 @@ import { WithdrawalStatus, AssetStatus } from "@vegaprotocol/types";
// ====================================================
export interface WithdrawalEvent_busEvents_event_TimeUpdate {
__typename: "TimeUpdate" | "MarketEvent" | "TransferResponses" | "PositionResolution" | "Order" | "Trade" | "Account" | "Party" | "MarginLevels" | "Proposal" | "Vote" | "MarketData" | "NodeSignature" | "LossSocialization" | "SettlePosition" | "Market" | "Asset" | "MarketTick" | "SettleDistressed" | "AuctionEvent" | "RiskFactor" | "Deposit" | "OracleSpec" | "LiquidityProvision" | "TransactionResult";
__typename: "TimeUpdate" | "MarketEvent" | "TransferResponses" | "PositionResolution" | "Order" | "Trade" | "AccountEvent" | "Party" | "MarginLevels" | "Proposal" | "Vote" | "MarketData" | "NodeSignature" | "LossSocialization" | "SettlePosition" | "Market" | "Asset" | "MarketTick" | "SettleDistressed" | "AuctionEvent" | "RiskFactor" | "Deposit" | "OracleSpec" | "LiquidityProvision" | "TransactionResult";
}
export interface WithdrawalEvent_busEvents_event_Withdrawal_asset_source_BuiltinAsset {

View File

@ -8,7 +8,7 @@ export type WithdrawPageQueryQueryVariables = Types.Exact<{
}>;
export type WithdrawPageQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, withdrawals?: Array<{ __typename?: 'Withdrawal', id: string, txHash?: string | null }> | null, accounts?: Array<{ __typename?: 'Account', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string } }> | null } | null, assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number, source: { __typename?: 'BuiltinAsset' } | { __typename?: 'ERC20', contractAddress: string } } } | null> | null } | null };
export type WithdrawPageQueryQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, withdrawals?: Array<{ __typename?: 'Withdrawal', id: string, txHash?: string | null }> | null, accounts?: Array<{ __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string, symbol: string } }> | null } | null, assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number, source: { __typename?: 'BuiltinAsset' } | { __typename?: 'ERC20', contractAddress: string } } } | null> | null } | null };
export const WithdrawPageQueryDocument = gql`

View File

@ -17,7 +17,7 @@ export type WithdrawalEventSubscriptionVariables = Types.Exact<{
}>;
export type WithdrawalEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', event: { __typename?: 'Account' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal', id: string, status: Types.WithdrawalStatus, amount: string, createdTimestamp: string, withdrawnTimestamp?: string | null, txHash?: string | null, pendingOnForeignChain: boolean, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number }, details?: { __typename?: 'Erc20WithdrawalDetails', receiverAddress: string } | null } }> | null };
export type WithdrawalEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', event: { __typename?: 'AccountEvent' } | { __typename?: 'Asset' } | { __typename?: 'AuctionEvent' } | { __typename?: 'Deposit' } | { __typename?: 'LiquidityProvision' } | { __typename?: 'LossSocialization' } | { __typename?: 'MarginLevels' } | { __typename?: 'Market' } | { __typename?: 'MarketData' } | { __typename?: 'MarketEvent' } | { __typename?: 'MarketTick' } | { __typename?: 'NodeSignature' } | { __typename?: 'OracleSpec' } | { __typename?: 'Order' } | { __typename?: 'Party' } | { __typename?: 'PositionResolution' } | { __typename?: 'Proposal' } | { __typename?: 'RiskFactor' } | { __typename?: 'SettleDistressed' } | { __typename?: 'SettlePosition' } | { __typename?: 'TimeUpdate' } | { __typename?: 'Trade' } | { __typename?: 'TransactionResult' } | { __typename?: 'TransferResponses' } | { __typename?: 'Vote' } | { __typename?: 'Withdrawal', id: string, status: Types.WithdrawalStatus, amount: string, createdTimestamp: string, withdrawnTimestamp?: string | null, txHash?: string | null, pendingOnForeignChain: boolean, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number }, details?: { __typename?: 'Erc20WithdrawalDetails', receiverAddress: string } | null } }> | null };
export const WithdrawalFieldsFragmentDoc = gql`
fragment WithdrawalFields on Withdrawal {

View File

@ -25,27 +25,27 @@ export const generateAsset = (override?: PartialDeep<Asset>) => {
},
infrastructureFeeAccount: {
balance: '1',
__typename: 'Account',
__typename: 'AccountBalance',
},
globalRewardPoolAccount: {
balance: '2',
__typename: 'Account',
__typename: 'AccountBalance',
},
takerFeeRewardAccount: {
balance: '3',
__typename: 'Account',
__typename: 'AccountBalance',
},
makerFeeRewardAccount: {
balance: '4',
__typename: 'Account',
__typename: 'AccountBalance',
},
lpFeeRewardAccount: {
balance: '5',
__typename: 'Account',
__typename: 'AccountBalance',
},
marketProposerRewardAccount: {
balance: '6',
__typename: 'Account',
__typename: 'AccountBalance',
},
__typename: 'Asset',
};