Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a29a8c1d4e | ||
|
|
162a934408 | ||
|
|
4581e117c4 | ||
|
|
e89b818e4c | ||
|
|
0665ac85db | ||
|
|
3c71a86b48 | ||
|
|
b381f16ace |
@@ -31,7 +31,7 @@ context('Asset page', { tags: '@regression' }, () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('should open details page when clicked on "View details"', () => {
|
||||
it.skip('should open details page when clicked on "View details"', () => {
|
||||
cy.getAssets().then((assets) => {
|
||||
assets.forEach((asset) => {
|
||||
cy.get(`[row-id="${asset.id}"] [col-id="actions"] button`)
|
||||
|
||||
@@ -27,11 +27,6 @@ context('Home Page', function () {
|
||||
16: 'Chain ID',
|
||||
};
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('[data-testid="stats-title"]')
|
||||
.each(($list, index) => {
|
||||
cy.wrap($list).should('contain.text', statTitles[index]);
|
||||
|
||||
@@ -34,11 +34,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
const parameterName = network_parameter[0];
|
||||
const parameterValue = network_parameter[1];
|
||||
if (this.networkParameterFormat.json.includes(parameterName)) {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableRows)
|
||||
.contains(parameterName)
|
||||
.should('be.visible')
|
||||
@@ -70,11 +65,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
if (this.networkParameterFormat.percentage.includes(parameterName)) {
|
||||
const formattedPercentageParameter =
|
||||
(parseFloat(parameterValue) * 100).toFixed(0) + '%';
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableRows)
|
||||
.contains(parameterName)
|
||||
.should('be.visible')
|
||||
@@ -158,11 +148,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
cy.convert_number_to_max_four_decimal(parameterValue)
|
||||
.add_commas_to_number_if_large_enough()
|
||||
.then((parameterValueFormatted) => {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableRows)
|
||||
.contains(parameterName)
|
||||
.should('be.visible')
|
||||
@@ -194,11 +179,6 @@ context('Network parameters page', { tags: '@smoke' }, function () {
|
||||
cy.convert_number_to_max_eighteen_decimal(parameterValue)
|
||||
.add_commas_to_number_if_large_enough()
|
||||
.then((parameterValueFormatted) => {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableRows)
|
||||
.contains(parameterName)
|
||||
.should('be.visible')
|
||||
|
||||
@@ -169,12 +169,6 @@ context.skip('Parties page', { tags: '@regression' }, function () {
|
||||
const jsonFields = '.hljs';
|
||||
const sideMenuBackground = '.absolute';
|
||||
|
||||
// Engage dark mode if not allready set
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(sideMenuBackground)
|
||||
.should('have.css', 'background-color')
|
||||
.then((background_color) => {
|
||||
|
||||
@@ -60,31 +60,16 @@ context.skip('Transactions page', function () {
|
||||
});
|
||||
cy.get('block').should('not.be.empty');
|
||||
cy.get('encoded-tnx').should('not.be.empty');
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('tx-type')
|
||||
.should('not.be.empty')
|
||||
.invoke('text')
|
||||
.then((txTypeTxt) => {
|
||||
if (txTypeTxt == 'Order Submission') {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('.hljs-attr')
|
||||
.should('have.length.at.least', 8)
|
||||
.each(($propertyName) => {
|
||||
cy.wrap($propertyName).should('not.be.empty');
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('.hljs-string')
|
||||
.should('have.length.at.least', 8)
|
||||
.each(($propertyValue) => {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type ExplorerGovernanceAssetQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerGovernanceAssetQuery = { __typename?: 'Query', networkParameter?: { __typename?: 'NetworkParameter', value: string } | null };
|
||||
export type ExplorerGovernanceAssetQuery = { __typename: 'Query', networkParameter?: { __typename: 'NetworkParameter', value: string } | null };
|
||||
|
||||
|
||||
export const ExplorerGovernanceAssetDocument = gql`
|
||||
|
||||
@@ -8,12 +8,12 @@ export type ExplorerEpochQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerEpochQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, firstBlock: string, lastBlock?: string | null } } };
|
||||
export type ExplorerEpochQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null, end?: any | null, firstBlock: string, lastBlock?: string | null } } };
|
||||
|
||||
export type ExplorerFutureEpochQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerFutureEpochQuery = { __typename?: 'Query', networkParameter?: { __typename?: 'NetworkParameter', value: string } | null, epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null } } };
|
||||
export type ExplorerFutureEpochQuery = { __typename: 'Query', networkParameter?: { __typename: 'NetworkParameter', value: string } | null, epoch: { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null } } };
|
||||
|
||||
|
||||
export const ExplorerEpochDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type ExplorerMarketQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerMarketQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string, settlementAsset: { __typename?: 'Asset', decimals: number } } } } } | null };
|
||||
export type ExplorerMarketQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, product: { __typename: 'Future', quoteName: string, settlementAsset: { __typename: 'Asset', decimals: number } } } } } | null };
|
||||
|
||||
|
||||
export const ExplorerMarketDocument = gql`
|
||||
|
||||
@@ -8,7 +8,7 @@ export type ExplorerNodeQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerNodeQuery = { __typename?: 'Query', node?: { __typename?: 'Node', id: string, name: string, status: Types.NodeStatus } | null };
|
||||
export type ExplorerNodeQuery = { __typename: 'Query', node?: { __typename: 'Node', id: string, name: string, status: Types.NodeStatus } | null };
|
||||
|
||||
|
||||
export const ExplorerNodeDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type ExplorerProposalQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerProposalQuery = { __typename?: 'Query', proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null };
|
||||
export type ExplorerProposalQuery = { __typename: 'Query', proposal?: { __typename: 'Proposal', id?: string | null, rationale: { __typename: 'ProposalRationale', title: string, description: string } } | null };
|
||||
|
||||
|
||||
export const ExplorerProposalDocument = gql`
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerDeterministicOrderFieldsFragment = { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } };
|
||||
export type ExplorerDeterministicOrderFieldsFragment = { __typename: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename: 'Party', id: string }, market: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, product: { __typename: 'Future', quoteName: string } } } } };
|
||||
|
||||
export type ExplorerDeterministicOrderQueryVariables = Types.Exact<{
|
||||
orderId: Types.Scalars['ID'];
|
||||
@@ -11,7 +11,7 @@ export type ExplorerDeterministicOrderQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerDeterministicOrderQuery = { __typename?: 'Query', orderByID: { __typename?: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename?: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename?: 'Party', id: string }, market: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } } };
|
||||
export type ExplorerDeterministicOrderQuery = { __typename: 'Query', orderByID: { __typename: 'Order', id: string, type?: Types.OrderType | null, reference: string, status: Types.OrderStatus, version: string, createdAt: any, updatedAt?: any | null, expiresAt?: any | null, timeInForce: Types.OrderTimeInForce, price: string, side: Types.Side, remaining: string, size: string, rejectionReason?: Types.OrderRejectionReason | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null, party: { __typename: 'Party', id: string }, market: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, product: { __typename: 'Future', quoteName: string } } } } } };
|
||||
|
||||
export const ExplorerDeterministicOrderFieldsFragmentDoc = gql`
|
||||
fragment ExplorerDeterministicOrderFields on Order {
|
||||
|
||||
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerStatsFieldsFragment = { __typename?: 'Statistics', averageOrdersPerBlock: string, ordersPerSecond: string, txPerBlock: string, tradesPerSecond: string };
|
||||
export type ExplorerStatsFieldsFragment = { __typename: 'Statistics', averageOrdersPerBlock: string, ordersPerSecond: string, txPerBlock: string, tradesPerSecond: string };
|
||||
|
||||
export type ExplorerStatsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerStatsQuery = { __typename?: 'Query', statistics: { __typename?: 'Statistics', averageOrdersPerBlock: string, ordersPerSecond: string, txPerBlock: string, tradesPerSecond: string } };
|
||||
export type ExplorerStatsQuery = { __typename: 'Query', statistics: { __typename: 'Statistics', averageOrdersPerBlock: string, ordersPerSecond: string, txPerBlock: string, tradesPerSecond: string } };
|
||||
|
||||
export const ExplorerStatsFieldsFragmentDoc = gql`
|
||||
fragment ExplorerStatsFields on Statistics {
|
||||
|
||||
@@ -8,7 +8,7 @@ export type ExplorerNodeVoteQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerNodeVoteQuery = { __typename?: 'Query', withdrawal?: { __typename?: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, name: string, decimals: number }, party: { __typename?: 'Party', id: string } } | null, deposit?: { __typename?: 'Deposit', id: string, status: Types.DepositStatus, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, name: string, decimals: number }, party: { __typename?: 'Party', id: string } } | null };
|
||||
export type ExplorerNodeVoteQuery = { __typename: 'Query', withdrawal?: { __typename: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, txHash?: string | null, asset: { __typename: 'Asset', id: string, name: string, decimals: number }, party: { __typename: 'Party', id: string } } | null, deposit?: { __typename: 'Deposit', id: string, status: Types.DepositStatus, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename: 'Asset', id: string, name: string, decimals: number }, party: { __typename: 'Party', id: string } } | null };
|
||||
|
||||
|
||||
export const ExplorerNodeVoteDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type ExplorerSettlementAssetForMarketQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerSettlementAssetForMarketQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number } | null };
|
||||
export type ExplorerSettlementAssetForMarketQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, decimalPlaces: number } | null };
|
||||
|
||||
|
||||
export const ExplorerSettlementAssetForMarketDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type ExplorerProposalStatusQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerProposalStatusQuery = { __typename?: 'Query', proposal?: { __typename?: 'Proposal', id?: string | null, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null } | null };
|
||||
export type ExplorerProposalStatusQuery = { __typename: 'Query', proposal?: { __typename: 'Proposal', id?: string | null, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null } | null };
|
||||
|
||||
|
||||
export const ExplorerProposalStatusDocument = gql`
|
||||
|
||||
+2
-2
@@ -8,14 +8,14 @@ export type ExplorerNewAssetSignatureBundleQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerNewAssetSignatureBundleQuery = { __typename?: 'Query', erc20ListAssetBundle?: { __typename?: 'Erc20ListAssetBundle', signatures: string, nonce: string } | null, asset?: { __typename?: 'Asset', status: Types.AssetStatus, source: { __typename?: 'BuiltinAsset' } | { __typename?: 'ERC20', contractAddress: string } } | null };
|
||||
export type ExplorerNewAssetSignatureBundleQuery = { __typename: 'Query', erc20ListAssetBundle?: { __typename: 'Erc20ListAssetBundle', signatures: string, nonce: string } | null, asset?: { __typename: 'Asset', status: Types.AssetStatus, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } | null };
|
||||
|
||||
export type ExplorerUpdateAssetSignatureBundleQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerUpdateAssetSignatureBundleQuery = { __typename?: 'Query', erc20SetAssetLimitsBundle: { __typename?: 'ERC20SetAssetLimitsBundle', signatures: string, nonce: string }, asset?: { __typename?: 'Asset', status: Types.AssetStatus, source: { __typename?: 'BuiltinAsset' } | { __typename?: 'ERC20', contractAddress: string } } | null };
|
||||
export type ExplorerUpdateAssetSignatureBundleQuery = { __typename: 'Query', erc20SetAssetLimitsBundle: { __typename: 'ERC20SetAssetLimitsBundle', signatures: string, nonce: string }, asset?: { __typename: 'Asset', status: Types.AssetStatus, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } | null };
|
||||
|
||||
|
||||
export const ExplorerNewAssetSignatureBundleDocument = gql`
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type ExplorerBundleSignersQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerBundleSignersQuery = { __typename?: 'Query', networkParameter?: { __typename?: 'NetworkParameter', value: string } | null, nodesConnection: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', id: string, name: string, status: Types.NodeStatus, ethereumAddress: string, pubkey: string, tmPubkey: string } } | null> | null } };
|
||||
export type ExplorerBundleSignersQuery = { __typename: 'Query', networkParameter?: { __typename: 'NetworkParameter', value: string } | null, nodesConnection: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', id: string, name: string, status: Types.NodeStatus, ethereumAddress: string, pubkey: string, tmPubkey: string } } | null> | null } };
|
||||
|
||||
|
||||
export const ExplorerBundleSignersDocument = gql`
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerWithdrawalPropertiesFragment = { __typename?: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, ref: string, txHash?: string | null, details?: { __typename?: 'Erc20WithdrawalDetails', receiverAddress: string } | null };
|
||||
export type ExplorerWithdrawalPropertiesFragment = { __typename: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, ref: string, txHash?: string | null, details?: { __typename: 'Erc20WithdrawalDetails', receiverAddress: string } | null };
|
||||
|
||||
export type ExplorerWithdrawalQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerWithdrawalQuery = { __typename?: 'Query', withdrawal?: { __typename?: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, ref: string, txHash?: string | null, details?: { __typename?: 'Erc20WithdrawalDetails', receiverAddress: string } | null } | null };
|
||||
export type ExplorerWithdrawalQuery = { __typename: 'Query', withdrawal?: { __typename: 'Withdrawal', id: string, status: Types.WithdrawalStatus, createdTimestamp: any, withdrawnTimestamp?: any | null, ref: string, txHash?: string | null, details?: { __typename: 'Erc20WithdrawalDetails', receiverAddress: string } | null } | null };
|
||||
|
||||
export const ExplorerWithdrawalPropertiesFragmentDoc = gql`
|
||||
fragment ExplorerWithdrawalProperties on Withdrawal {
|
||||
|
||||
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerOracleDataSourceFragment = { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } } };
|
||||
export type ExplorerOracleDataSourceFragment = { __typename: 'OracleSpec', dataSourceSpec: { __typename: 'ExternalDataSourceSpec', spec: { __typename: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename: 'DataSourceDefinitionInternal', sourceType: { __typename: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } } };
|
||||
|
||||
export type ExplorerOracleDataConnectionFragment = { __typename?: 'OracleSpec', dataConnection: { __typename?: 'OracleDataConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
||||
export type ExplorerOracleDataConnectionFragment = { __typename: 'OracleSpec', dataConnection: { __typename: 'OracleDataConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename: 'OracleDataEdge', node: { __typename: 'OracleData', externalData: { __typename: 'ExternalData', data: { __typename: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename: 'Property', name: string, value: string }> | null } } } } | null> | null } };
|
||||
|
||||
export type ExplorerOracleSpecsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerOracleSpecsQuery = { __typename?: 'Query', oracleSpecsConnection?: { __typename?: 'OracleSpecsConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleSpecEdge', node: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } } } } | null> | null } | null };
|
||||
export type ExplorerOracleSpecsQuery = { __typename: 'Query', oracleSpecsConnection?: { __typename: 'OracleSpecsConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename: 'OracleSpecEdge', node: { __typename: 'OracleSpec', dataSourceSpec: { __typename: 'ExternalDataSourceSpec', spec: { __typename: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename: 'DataSourceDefinitionInternal', sourceType: { __typename: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } } } } | null> | null } | null };
|
||||
|
||||
export type ExplorerOracleSpecByIdQueryVariables = Types.Exact<{
|
||||
id: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerOracleSpecByIdQuery = { __typename?: 'Query', oracleSpec?: { __typename?: 'OracleSpec', dataSourceSpec: { __typename?: 'ExternalDataSourceSpec', spec: { __typename?: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename?: 'DataSourceDefinitionInternal', sourceType: { __typename?: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename?: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename?: 'OracleDataConnection', pageInfo: { __typename?: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
||||
export type ExplorerOracleSpecByIdQuery = { __typename: 'Query', oracleSpec?: { __typename: 'OracleSpec', dataSourceSpec: { __typename: 'ExternalDataSourceSpec', spec: { __typename: 'DataSourceSpec', id: string, createdAt: any, updatedAt?: any | null, status: Types.DataSourceSpecStatus, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType }, conditions?: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator }> | null }> | null } } | { __typename: 'DataSourceDefinitionInternal', sourceType: { __typename: 'DataSourceSpecConfigurationTime', conditions: Array<{ __typename: 'Condition', value?: string | null, operator: Types.ConditionOperator } | null> } } } } }, dataConnection: { __typename: 'OracleDataConnection', pageInfo: { __typename: 'PageInfo', hasNextPage: boolean }, edges?: Array<{ __typename: 'OracleDataEdge', node: { __typename: 'OracleData', externalData: { __typename: 'ExternalData', data: { __typename: 'Data', matchedSpecIds?: Array<string> | null, broadcastAt: any, signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, data?: Array<{ __typename: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
||||
|
||||
export const ExplorerOracleDataSourceFragmentDoc = gql`
|
||||
fragment ExplorerOracleDataSource on OracleSpec {
|
||||
|
||||
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerOracleForMarketsMarketFragment = { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } } } };
|
||||
export type ExplorerOracleForMarketsMarketFragment = { __typename: 'Market', id: string, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', product: { __typename: 'Future', dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string } } } } };
|
||||
|
||||
export type ExplorerOracleFormMarketsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerOracleFormMarketsQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string } } } } } }> } | null };
|
||||
export type ExplorerOracleFormMarketsQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', product: { __typename: 'Future', dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string } } } } } }> } | null };
|
||||
|
||||
export const ExplorerOracleForMarketsMarketFragmentDoc = gql`
|
||||
fragment ExplorerOracleForMarketsMarket on Market {
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ExplorerPartyAssetsAccountsFragment = { __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 } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } | null };
|
||||
export type ExplorerPartyAssetsAccountsFragment = { __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 } }, market?: { __typename: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, product: { __typename: 'Future', quoteName: string } } } } | null };
|
||||
|
||||
export type ExplorerPartyAssetsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ExplorerPartyAssetsQuery = { __typename?: 'Query', partiesConnection?: { __typename?: 'PartyConnection', edges: Array<{ __typename?: 'PartyEdge', node: { __typename?: 'Party', id: string, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string, linkings: { __typename?: 'StakesConnection', edges?: Array<{ __typename?: 'StakeLinkingEdge', node: { __typename?: 'StakeLinking', amount: string } } | null> | null } }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __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 } }, market?: { __typename?: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, product: { __typename?: 'Future', quoteName: string } } } } | null } } | null> | null } | null } }> } | null };
|
||||
export type ExplorerPartyAssetsQuery = { __typename: 'Query', partiesConnection?: { __typename: 'PartyConnection', edges: Array<{ __typename: 'PartyEdge', node: { __typename: 'Party', id: string, delegationsConnection?: { __typename: 'DelegationsConnection', edges?: Array<{ __typename: 'DelegationEdge', node: { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename: 'StakingSummary', currentStakeAvailable: string, linkings: { __typename: 'StakesConnection', edges?: Array<{ __typename: 'StakeLinkingEdge', node: { __typename: 'StakeLinking', amount: string } } | null> | null } }, accountsConnection?: { __typename: 'AccountsConnection', edges?: Array<{ __typename: 'AccountEdge', node: { __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 } }, market?: { __typename: 'Market', id: string, decimalPlaces: number, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, product: { __typename: 'Future', quoteName: string } } } } | null } } | null> | null } | null } }> } | null };
|
||||
|
||||
export const ExplorerPartyAssetsAccountsFragmentDoc = gql`
|
||||
fragment ExplorerPartyAssetsAccounts on AccountBalance {
|
||||
|
||||
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type ExplorerNodeNamesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerNodeNamesQuery = { __typename?: 'Query', nodesConnection: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', id: string, name: string, pubkey: string, tmPubkey: string, ethereumAddress: string } } | null> | null } };
|
||||
export type ExplorerNodeNamesQuery = { __typename: 'Query', nodesConnection: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', id: string, name: string, pubkey: string, tmPubkey: string, ethereumAddress: string } } | null> | null } };
|
||||
|
||||
|
||||
export const ExplorerNodeNamesDocument = gql`
|
||||
|
||||
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type ExplorerNodesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ExplorerNodesQuery = { __typename?: 'Query', nodesConnection: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', id: string, name: string, infoUrl: string, avatarUrl?: string | null, pubkey: string, tmPubkey: string, ethereumAddress: string, location: string, status: Types.NodeStatus, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename?: 'EpochData', total: number, offline: number, online: number } | null } } | null> | null } };
|
||||
export type ExplorerNodesQuery = { __typename: 'Query', nodesConnection: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', id: string, name: string, infoUrl: string, avatarUrl?: string | null, pubkey: string, tmPubkey: string, ethereumAddress: string, location: string, status: Types.NodeStatus, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename: 'EpochData', total: number, offline: number, online: number } | null } } | null> | null } };
|
||||
|
||||
|
||||
export const ExplorerNodesDocument = gql`
|
||||
|
||||
@@ -98,11 +98,6 @@ describe(
|
||||
.and('have.length', 64);
|
||||
cy.getByTestId(proposalTermsToggle).click();
|
||||
// 3001-VOTE-052 3001-VOTE-010
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('code.language-json')
|
||||
.should('exist')
|
||||
.within(() => {
|
||||
|
||||
@@ -295,7 +295,8 @@ context(
|
||||
|
||||
// Will fail if run after 'Able to submit update market proposal and vote for proposal'
|
||||
// 3002-PROP-022
|
||||
it('Unable to submit update market proposal without equity-like share in the market', function () {
|
||||
// Skipping due to #4262
|
||||
it.skip('Unable to submit update market proposal without equity-like share in the market', function () {
|
||||
switchVegaWalletPubKey();
|
||||
stakingPageAssociateTokens('1');
|
||||
goToMakeNewProposal(governanceProposalType.UPDATE_MARKET);
|
||||
|
||||
@@ -116,12 +116,6 @@ context(
|
||||
cy.getByTestId(amountInput).click().type('120');
|
||||
cy.getByTestId(submitWithdrawalButton).click();
|
||||
});
|
||||
// assert withdrawal request
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.first(txTimeout)
|
||||
.should('contain.text', 'Funds unlocked')
|
||||
@@ -135,11 +129,6 @@ context(
|
||||
cy.getByTestId(toastClose).click();
|
||||
});
|
||||
// withdrawal complete
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.first(txTimeout)
|
||||
.should('contain.text', 'The withdrawal has been approved.')
|
||||
@@ -149,11 +138,6 @@ context(
|
||||
'Withdraw 120.00 tUSDC'
|
||||
);
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.last(txTimeout)
|
||||
.should('contain.text', 'Transaction confirmed')
|
||||
@@ -161,11 +145,6 @@ context(
|
||||
cy.getByTestId('external-link').should('exist');
|
||||
});
|
||||
// withdrawal history for complete withdrawal displayed
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableWithdrawnStatus)
|
||||
.eq(1, txTimeout)
|
||||
.should('have.text', 'Completed')
|
||||
@@ -207,11 +186,6 @@ context(
|
||||
cy.getByTestId(submitWithdrawalButton).click();
|
||||
});
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.first(txTimeout)
|
||||
.should('contain.text', 'Funds unlocked')
|
||||
@@ -223,11 +197,6 @@ context(
|
||||
);
|
||||
cy.getByTestId(toastClose).click();
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(tableTxHash)
|
||||
.eq(1)
|
||||
.should('have.text', 'Complete withdrawal')
|
||||
@@ -243,33 +212,18 @@ context(
|
||||
});
|
||||
ethereumWalletConnect();
|
||||
cy.getByTestId(completeWithdrawalButton).first().click();
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.last(txTimeout)
|
||||
.should('contain.text', 'Awaiting confirmation')
|
||||
.within(() => {
|
||||
cy.getByTestId('external-link').should('exist');
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.first(txTimeout)
|
||||
.should('contain.text', 'The withdrawal has been approved.')
|
||||
.within(() => {
|
||||
cy.getByTestId(toastPanel).should('contain.text', '110.00', 'tUSDC');
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.last(txTimeout)
|
||||
.should('contain.text', 'Transaction confirmed')
|
||||
@@ -293,11 +247,6 @@ context(
|
||||
cy.getByTestId(amountInput).click().type('50');
|
||||
cy.getByTestId(submitWithdrawalButton).click();
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(toast)
|
||||
.first(txTimeout)
|
||||
.should('contain.text', 'Funds unlocked')
|
||||
|
||||
@@ -16,11 +16,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
||||
});
|
||||
|
||||
it('should display announcement banner', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('app-announcement')
|
||||
.should('contain.text', 'TEST ANNOUNCEMENT!')
|
||||
.within(() => {
|
||||
@@ -40,11 +35,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
||||
waitForSpinner();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('proposals-list-item')
|
||||
.should('have.length.at.least', 1)
|
||||
.first()
|
||||
@@ -104,11 +94,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
||||
});
|
||||
|
||||
it('should contain link to specific validators', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('validators')
|
||||
.should('have.length', '2')
|
||||
.each(($validator) => {
|
||||
@@ -135,11 +120,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
||||
});
|
||||
|
||||
it('should display network data', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('git-network-data')
|
||||
.should('contain.text', 'Reading network data from')
|
||||
.within(() => {
|
||||
@@ -151,11 +131,6 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
|
||||
});
|
||||
|
||||
it('should display eth data', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('git-eth-data')
|
||||
.should('contain.text', 'Reading Ethereum data from')
|
||||
.within(() => {
|
||||
|
||||
@@ -142,11 +142,6 @@ context(
|
||||
mockNetworkUpgradeProposal();
|
||||
navigateTo(navigation.proposals);
|
||||
cy.getByTestId('open-proposals').within(() => {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('li')
|
||||
.eq(0)
|
||||
.should('have.attr', 'data-testid', networkUpgradeProposalListItem)
|
||||
@@ -205,11 +200,6 @@ context(
|
||||
.should('contain.text', '99.98% approval (% validator voting power)')
|
||||
.and('contain.text', '(67% voting power required)');
|
||||
cy.get('h2').should('contain.text', 'Approvers (4/4 validators)');
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('validator-name')
|
||||
.should('have.length', 4)
|
||||
.each(($validator) => {
|
||||
|
||||
@@ -42,11 +42,6 @@ context(
|
||||
// Skipping due to bug #3471 causing flaky failuress
|
||||
it.skip('should have option to view go to next and previous page', function () {
|
||||
waitForBeginningOfEpoch();
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('page-info')
|
||||
.should('contain.text', 'Page ')
|
||||
.invoke('text')
|
||||
|
||||
@@ -21,11 +21,6 @@ context(
|
||||
// 1005-VEST-001
|
||||
// 1005-VEST-002
|
||||
it('Able to view tranches', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('tranche-item')
|
||||
.should('have.length', 2)
|
||||
.first()
|
||||
@@ -56,11 +51,6 @@ context(
|
||||
cy.get('span').eq(1).should('have.text', 0);
|
||||
});
|
||||
cy.getByTestId('key-value-table').within(() => {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('link')
|
||||
.should('have.length', 8)
|
||||
.each((ethLink) => {
|
||||
@@ -68,11 +58,6 @@ context(
|
||||
.should('have.attr', 'href')
|
||||
.and('contain', 'https://sepolia.etherscan.io/address/');
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('redeem-link')
|
||||
.should('have.length', 8)
|
||||
.each((redeemLink) => {
|
||||
@@ -86,11 +71,6 @@ context(
|
||||
it('Able to view tranches with less than 10 vega', function () {
|
||||
navigateTo(navigation.supply);
|
||||
cy.getByTestId('show-all-tranches').click();
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('tranche-item')
|
||||
.should('have.length', 8)
|
||||
.first()
|
||||
|
||||
@@ -74,11 +74,6 @@ context('Validators Page - verify elements on page', function () {
|
||||
function () {
|
||||
// 1002-STKE-050
|
||||
it('Should be able to see validator names', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('[col-id="validator"] > div > span')
|
||||
.should('have.length.at.least', 1)
|
||||
.each(($name) => {
|
||||
@@ -87,11 +82,6 @@ context('Validators Page - verify elements on page', function () {
|
||||
});
|
||||
|
||||
it('Should be able to see validator stake', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('total-stake')
|
||||
.should('have.length.at.least', 1)
|
||||
.each(($stake) => {
|
||||
@@ -115,11 +105,6 @@ context('Validators Page - verify elements on page', function () {
|
||||
});
|
||||
|
||||
it('Should be able to see validator normalised voting power', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('normalised-voting-power')
|
||||
.should('have.length.at.least', 1)
|
||||
.each(($vPower) => {
|
||||
@@ -141,11 +126,6 @@ context('Validators Page - verify elements on page', function () {
|
||||
|
||||
// 2002-SINC-018
|
||||
it('Should be able to see validator total penalties', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('total-penalty')
|
||||
.should('have.length.at.least', 1)
|
||||
.each(($penalties) => {
|
||||
@@ -166,11 +146,6 @@ context('Validators Page - verify elements on page', function () {
|
||||
});
|
||||
|
||||
it('Should be able to see validator pending stake', function () {
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('total-pending-stake')
|
||||
.should('have.length.at.least', 1)
|
||||
.each(($pendingStake) => {
|
||||
|
||||
@@ -340,7 +340,7 @@ context(
|
||||
.contains(name)
|
||||
.parent()
|
||||
.siblings()
|
||||
.then((elementAmount) => {
|
||||
.should((elementAmount) => {
|
||||
const displayedAmount = parseFloat(elementAmount.text());
|
||||
expect(displayedAmount).be.gte(expectedAmount);
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type WalletDelegationFieldsFragment = { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } };
|
||||
export type WalletDelegationFieldsFragment = { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string, name: string } };
|
||||
|
||||
export type DelegationsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -11,7 +11,7 @@ export type DelegationsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type DelegationsQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string }, party?: { __typename?: 'Party', id: string, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __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 } | null } | null };
|
||||
export type DelegationsQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string }, party?: { __typename: 'Party', id: string, delegationsConnection?: { __typename: 'DelegationsConnection', edges?: Array<{ __typename: 'DelegationEdge', node: { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string, name: string } } } | null> | null } | null, stakingSummary: { __typename: 'StakingSummary', currentStakeAvailable: string }, accountsConnection?: { __typename: 'AccountsConnection', edges?: Array<{ __typename: 'AccountEdge', node: { __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 } | null } | null };
|
||||
|
||||
export const WalletDelegationFieldsFragmentDoc = gql`
|
||||
fragment WalletDelegationFields on Delegation {
|
||||
|
||||
+2
-2
@@ -8,14 +8,14 @@ export type ProposalAssetQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ProposalAssetQuery = { __typename?: 'Query', asset?: { __typename?: 'Asset', status: Types.AssetStatus, source: { __typename?: 'BuiltinAsset' } | { __typename?: 'ERC20', contractAddress: string } } | null };
|
||||
export type ProposalAssetQuery = { __typename: 'Query', asset?: { __typename: 'Asset', status: Types.AssetStatus, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string } } | null };
|
||||
|
||||
export type AssetListBundleQueryVariables = Types.Exact<{
|
||||
assetId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type AssetListBundleQuery = { __typename?: 'Query', erc20ListAssetBundle?: { __typename?: 'Erc20ListAssetBundle', assetSource: string, vegaAssetId: string, nonce: string, signatures: string } | null };
|
||||
export type AssetListBundleQuery = { __typename: 'Query', erc20ListAssetBundle?: { __typename: 'Erc20ListAssetBundle', assetSource: string, vegaAssetId: string, nonce: string, signatures: string } | null };
|
||||
|
||||
|
||||
export const ProposalAssetDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type VoteButtonsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type VoteButtonsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string } } | null };
|
||||
export type VoteButtonsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, stakingSummary: { __typename: 'StakingSummary', currentStakeAvailable: string } } | null };
|
||||
|
||||
|
||||
export const VoteButtonsDocument = gql`
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type UserVoteQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type UserVoteQuery = { __typename?: 'Query', party?: { __typename?: 'Party', votesConnection?: { __typename?: 'ProposalVoteConnection', edges?: Array<{ __typename?: 'ProposalVoteEdge', node: { __typename?: 'ProposalVote', proposalId: string, vote: { __typename?: 'Vote', value: Types.VoteValue, datetime: any } } }> | null } | null } | null };
|
||||
export type UserVoteQuery = { __typename: 'Query', party?: { __typename: 'Party', votesConnection?: { __typename: 'ProposalVoteConnection', edges?: Array<{ __typename: 'ProposalVoteEdge', node: { __typename: 'ProposalVote', proposalId: string, vote: { __typename: 'Vote', value: Types.VoteValue, datetime: any } } }> | null } | null } | null };
|
||||
|
||||
|
||||
export const UserVoteDocument = gql`
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ProposalFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } };
|
||||
export type ProposalFieldsFragment = { __typename: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename: 'ProposalRationale', title: string, description: string }, party: { __typename: 'Party', id: string }, terms: { __typename: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename: 'NewFreeform' } | { __typename: 'NewMarket', instrument: { __typename: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename: 'FutureProduct', settlementAsset: { __typename: 'Asset', symbol: string } } | null } } | { __typename: 'UpdateAsset', quantum: string, assetId: string, source: { __typename: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename: 'UpdateMarket', marketId: string } | { __typename: 'UpdateNetworkParameter', networkParameter: { __typename: 'NetworkParameter', key: string, value: string } } }, votes: { __typename: 'ProposalVotes', yes: { __typename: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } };
|
||||
|
||||
export type ProposalsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ProposalsQuery = { __typename?: 'Query', proposalsConnection?: { __typename?: 'ProposalsConnection', edges?: Array<{ __typename?: 'ProposalEdge', node: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string }, party: { __typename?: 'Party', id: string }, terms: { __typename?: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename?: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename?: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket', instrument: { __typename?: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename?: 'FutureProduct', settlementAsset: { __typename?: 'Asset', symbol: string } } | null } } | { __typename?: 'UpdateAsset', quantum: string, assetId: string, source: { __typename?: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename?: 'UpdateMarket', marketId: string } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } }, votes: { __typename?: 'ProposalVotes', yes: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename?: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } } } | null> | null } | null };
|
||||
export type ProposalsQuery = { __typename: 'Query', proposalsConnection?: { __typename: 'ProposalsConnection', edges?: Array<{ __typename: 'ProposalEdge', node: { __typename: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, datetime: any, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null, rationale: { __typename: 'ProposalRationale', title: string, description: string }, party: { __typename: 'Party', id: string }, terms: { __typename: 'ProposalTerms', closingDatetime: any, enactmentDatetime?: any | null, change: { __typename: 'NewAsset', name: string, symbol: string, decimals: number, quantum: string, source: { __typename: 'BuiltinAsset', maxFaucetAmountMint: string } | { __typename: 'ERC20', contractAddress: string, withdrawThreshold: string, lifetimeLimit: string } } | { __typename: 'NewFreeform' } | { __typename: 'NewMarket', instrument: { __typename: 'InstrumentConfiguration', name: string, code: string, futureProduct?: { __typename: 'FutureProduct', settlementAsset: { __typename: 'Asset', symbol: string } } | null } } | { __typename: 'UpdateAsset', quantum: string, assetId: string, source: { __typename: 'UpdateERC20', lifetimeLimit: string, withdrawThreshold: string } } | { __typename: 'UpdateMarket', marketId: string } | { __typename: 'UpdateNetworkParameter', networkParameter: { __typename: 'NetworkParameter', key: string, value: string } } }, votes: { __typename: 'ProposalVotes', yes: { __typename: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string }, no: { __typename: 'ProposalVoteSide', totalTokens: string, totalNumber: string, totalEquityLikeShareWeight: string } } } } | null> | null } | null };
|
||||
|
||||
export const ProposalFieldsFragmentDoc = gql`
|
||||
fragment ProposalFields on Proposal {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type ProposalMarketsQueryQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type ProposalMarketsQueryQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', name: string, code: string } }, proposal?: { __typename?: 'Proposal', state: Types.ProposalState } | null } }> } | null };
|
||||
export type ProposalMarketsQueryQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', name: string, code: string } }, proposal?: { __typename: 'Proposal', state: Types.ProposalState } | null } }> } | null };
|
||||
|
||||
|
||||
export const ProposalMarketsQueryDocument = gql`
|
||||
|
||||
@@ -3,11 +3,11 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type RewardFieldsFragment = { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } };
|
||||
export type RewardFieldsFragment = { __typename: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename: 'Asset', id: string, symbol: string, name: string, decimals: number }, party: { __typename: 'Party', id: string }, epoch: { __typename: 'Epoch', id: string } };
|
||||
|
||||
export type DelegationFieldsFragment = { __typename?: 'Delegation', amount: string, epoch: number };
|
||||
export type DelegationFieldsFragment = { __typename: 'Delegation', amount: string, epoch: number };
|
||||
|
||||
export type EpochRewardSummaryFieldsFragment = { __typename?: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType };
|
||||
export type EpochRewardSummaryFieldsFragment = { __typename: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType };
|
||||
|
||||
export type RewardsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -18,7 +18,7 @@ export type RewardsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type RewardsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, rewardsConnection?: { __typename?: 'RewardsConnection', edges?: Array<{ __typename?: 'RewardEdge', node: { __typename?: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename?: 'Asset', id: string, symbol: string, name: string, decimals: number }, party: { __typename?: 'Party', id: string }, epoch: { __typename?: 'Epoch', id: string } } } | null> | null } | null, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number } } | null> | null } | null } | null, epochRewardSummaries?: { __typename?: 'EpochRewardSummaryConnection', edges?: Array<{ __typename?: 'EpochRewardSummaryEdge', node: { __typename?: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType } } | null> | null } | null };
|
||||
export type RewardsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, rewardsConnection?: { __typename: 'RewardsConnection', edges?: Array<{ __typename: 'RewardEdge', node: { __typename: 'Reward', rewardType: Types.AccountType, amount: string, percentageOfTotal: string, receivedAt: any, asset: { __typename: 'Asset', id: string, symbol: string, name: string, decimals: number }, party: { __typename: 'Party', id: string }, epoch: { __typename: 'Epoch', id: string } } } | null> | null } | null, delegationsConnection?: { __typename: 'DelegationsConnection', edges?: Array<{ __typename: 'DelegationEdge', node: { __typename: 'Delegation', amount: string, epoch: number } } | null> | null } | null } | null, epochRewardSummaries?: { __typename: 'EpochRewardSummaryConnection', edges?: Array<{ __typename: 'EpochRewardSummaryEdge', node: { __typename: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType } } | null> | null } | null };
|
||||
|
||||
export type EpochAssetsRewardsQueryVariables = Types.Exact<{
|
||||
epochRewardSummariesFilter?: Types.InputMaybe<Types.RewardSummaryFilter>;
|
||||
@@ -26,14 +26,14 @@ export type EpochAssetsRewardsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type EpochAssetsRewardsQuery = { __typename?: 'Query', assetsConnection?: { __typename?: 'AssetsConnection', edges?: Array<{ __typename?: 'AssetEdge', node: { __typename?: 'Asset', id: string, name: string, decimals: number } } | null> | null } | null, epochRewardSummaries?: { __typename?: 'EpochRewardSummaryConnection', edges?: Array<{ __typename?: 'EpochRewardSummaryEdge', node: { __typename?: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType } } | null> | null } | null };
|
||||
export type EpochAssetsRewardsQuery = { __typename: 'Query', assetsConnection?: { __typename: 'AssetsConnection', edges?: Array<{ __typename: 'AssetEdge', node: { __typename: 'Asset', id: string, name: string, decimals: number } } | null> | null } | null, epochRewardSummaries?: { __typename: 'EpochRewardSummaryConnection', edges?: Array<{ __typename: 'EpochRewardSummaryEdge', node: { __typename: 'EpochRewardSummary', epoch: number, assetId: string, amount: string, rewardType: Types.AccountType } } | null> | null } | null };
|
||||
|
||||
export type EpochFieldsFragment = { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } };
|
||||
export type EpochFieldsFragment = { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } };
|
||||
|
||||
export type EpochQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type EpochQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } } };
|
||||
export type EpochQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } } };
|
||||
|
||||
export const RewardFieldsFragmentDoc = gql`
|
||||
fragment RewardFields on Reward {
|
||||
|
||||
@@ -8,7 +8,7 @@ export type PreviousEpochQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type PreviousEpochQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string, validatorsConnection?: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', id: string, stakedTotal: string, rewardScore?: { __typename?: 'RewardScore', rawValidatorScore: string, performanceScore: string, multisigScore: string, validatorScore: string, normalisedScore: string, validatorStatus: Types.ValidatorStatus } | null, rankingScore: { __typename?: 'RankingScore', status: Types.ValidatorStatus, previousStatus: Types.ValidatorStatus, rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string } } } | null> | null } | null } };
|
||||
export type PreviousEpochQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string, validatorsConnection?: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', id: string, stakedTotal: string, rewardScore?: { __typename: 'RewardScore', rawValidatorScore: string, performanceScore: string, multisigScore: string, validatorScore: string, normalisedScore: string, validatorStatus: Types.ValidatorStatus } | null, rankingScore: { __typename: 'RankingScore', status: Types.ValidatorStatus, previousStatus: Types.ValidatorStatus, rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string } } } | null> | null } | null } };
|
||||
|
||||
|
||||
export const PreviousEpochDocument = gql`
|
||||
|
||||
+3
-3
@@ -3,9 +3,9 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type StakingNodeFieldsFragment = { __typename?: 'Node', id: string, name: string, pubkey: string, infoUrl: string, location: string, ethereumAddress: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename?: 'EpochData', total: number, offline: number, online: number } | null, rankingScore: { __typename?: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } };
|
||||
export type StakingNodeFieldsFragment = { __typename: 'Node', id: string, name: string, pubkey: string, infoUrl: string, location: string, ethereumAddress: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename: 'EpochData', total: number, offline: number, online: number } | null, rankingScore: { __typename: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } };
|
||||
|
||||
export type StakingDelegationFieldsFragment = { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string }, party: { __typename?: 'Party', id: string } };
|
||||
export type StakingDelegationFieldsFragment = { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string }, party: { __typename: 'Party', id: string } };
|
||||
|
||||
export type StakingQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -13,7 +13,7 @@ export type StakingQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type StakingQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, stakingSummary: { __typename?: 'StakingSummary', currentStakeAvailable: string }, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string }, party: { __typename?: 'Party', id: string } } } | null> | null } | null } | null, epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } }, nodesConnection: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', id: string, name: string, pubkey: string, infoUrl: string, location: string, ethereumAddress: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename?: 'EpochData', total: number, offline: number, online: number } | null, rankingScore: { __typename?: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } } } | null> | null }, nodeData?: { __typename?: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number, uptime: number } | null };
|
||||
export type StakingQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, stakingSummary: { __typename: 'StakingSummary', currentStakeAvailable: string }, delegationsConnection?: { __typename: 'DelegationsConnection', edges?: Array<{ __typename: 'DelegationEdge', node: { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string }, party: { __typename: 'Party', id: string } } } | null> | null } | null } | null, epoch: { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } }, nodesConnection: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', id: string, name: string, pubkey: string, infoUrl: string, location: string, ethereumAddress: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, epochData?: { __typename: 'EpochData', total: number, offline: number, online: number } | null, rankingScore: { __typename: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } } } | null> | null }, nodeData?: { __typename: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number, uptime: number } | null };
|
||||
|
||||
export const StakingNodeFieldsFragmentDoc = gql`
|
||||
fragment StakingNodeFields on Node {
|
||||
|
||||
+2
-2
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type LinkingsFieldsFragment = { __typename?: 'StakeLinking', id: string, txHash: string, status: Types.StakeLinkingStatus };
|
||||
export type LinkingsFieldsFragment = { __typename: 'StakeLinking', id: string, txHash: string, status: Types.StakeLinkingStatus };
|
||||
|
||||
export type PartyStakeLinkingsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type PartyStakeLinkingsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, stakingSummary: { __typename?: 'StakingSummary', linkings: { __typename?: 'StakesConnection', edges?: Array<{ __typename?: 'StakeLinkingEdge', node: { __typename?: 'StakeLinking', id: string, txHash: string, status: Types.StakeLinkingStatus } } | null> | null } } } | null };
|
||||
export type PartyStakeLinkingsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, stakingSummary: { __typename: 'StakingSummary', linkings: { __typename: 'StakesConnection', edges?: Array<{ __typename: 'StakeLinkingEdge', node: { __typename: 'StakeLinking', id: string, txHash: string, status: Types.StakeLinkingStatus } } | null> | null } } } | null };
|
||||
|
||||
export const LinkingsFieldsFragmentDoc = gql`
|
||||
fragment LinkingsFields on StakeLinking {
|
||||
|
||||
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type NodesFragmentFragment = { __typename?: 'Node', avatarUrl?: string | null, id: string, name: string, pubkey: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, rankingScore: { __typename?: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } };
|
||||
export type NodesFragmentFragment = { __typename: 'Node', avatarUrl?: string | null, id: string, name: string, pubkey: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, rankingScore: { __typename: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } };
|
||||
|
||||
export type NodesQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NodesQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string, timestamps: { __typename?: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } }, nodesConnection: { __typename?: 'NodesConnection', edges?: Array<{ __typename?: 'NodeEdge', node: { __typename?: 'Node', avatarUrl?: string | null, id: string, name: string, pubkey: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, rankingScore: { __typename?: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } } } | null> | null }, nodeData?: { __typename?: 'NodeData', stakedTotal: string } | null };
|
||||
export type NodesQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string, timestamps: { __typename: 'EpochTimestamps', start?: any | null, end?: any | null, expiry?: any | null } }, nodesConnection: { __typename: 'NodesConnection', edges?: Array<{ __typename: 'NodeEdge', node: { __typename: 'Node', avatarUrl?: string | null, id: string, name: string, pubkey: string, stakedByOperator: string, stakedByDelegates: string, stakedTotal: string, pendingStake: string, rankingScore: { __typename: 'RankingScore', rankingScore: string, stakeScore: string, performanceScore: string, votingPower: string, status: Types.ValidatorStatus } } } | null> | null }, nodeData?: { __typename: 'NodeData', stakedTotal: string } | null };
|
||||
|
||||
export const NodesFragmentFragmentDoc = gql`
|
||||
fragment NodesFragment on Node {
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type StakingDelegationsFieldsFragment = { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string } };
|
||||
export type StakingDelegationsFieldsFragment = { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string } };
|
||||
|
||||
export type PartyDelegationsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -11,7 +11,7 @@ export type PartyDelegationsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type PartyDelegationsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, delegationsConnection?: { __typename?: 'DelegationsConnection', edges?: Array<{ __typename?: 'DelegationEdge', node: { __typename?: 'Delegation', amount: string, epoch: number, node: { __typename?: 'Node', id: string } } } | null> | null } | null } | null, epoch: { __typename?: 'Epoch', id: string } };
|
||||
export type PartyDelegationsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, delegationsConnection?: { __typename: 'DelegationsConnection', edges?: Array<{ __typename: 'DelegationEdge', node: { __typename: 'Delegation', amount: string, epoch: number, node: { __typename: 'Node', id: string } } } | null> | null } | null } | null, epoch: { __typename: 'Epoch', id: string } };
|
||||
|
||||
export const StakingDelegationsFieldsFragmentDoc = gql`
|
||||
fragment StakingDelegationsFields on Delegation {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type NodeDataQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NodeDataQuery = { __typename?: 'Query', nodeData?: { __typename?: 'NodeData', stakedTotal: string } | null };
|
||||
export type NodeDataQuery = { __typename: 'Query', nodeData?: { __typename: 'NodeData', stakedTotal: string } | null };
|
||||
|
||||
|
||||
export const NodeDataDocument = gql`
|
||||
|
||||
@@ -92,16 +92,14 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
||||
|
||||
cy.highlight('deposit verification');
|
||||
|
||||
cy.getByTestId('asset', txTimeout).should('contain.text', btcSymbol);
|
||||
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||
'contain.text',
|
||||
btcSymbol
|
||||
);
|
||||
cy.getByTestId(depositsTab).click();
|
||||
cy.get('.ag-cell-value', txTimeout).should('contain.text', btcSymbol);
|
||||
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('[col-id="txHash"]')
|
||||
.should('have.length.above', 2)
|
||||
.eq(1)
|
||||
@@ -149,7 +147,6 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
||||
// 1002-WITH-022
|
||||
// 1002-WITH-023
|
||||
// 0003-WTXN-011
|
||||
|
||||
cy.getByTestId('Withdrawals').click();
|
||||
cy.getByTestId('withdraw-dialog-button').click();
|
||||
selectAsset(0);
|
||||
@@ -160,18 +157,9 @@ describe('capsule - without MultiSign', { tags: '@slow' }, () => {
|
||||
'contain.text',
|
||||
'Funds unlocked'
|
||||
);
|
||||
cy.getByTestId(toastCloseBtn).click();
|
||||
cy.getByTestId('tab-withdrawals').within(() => {
|
||||
cy.get('.ag-center-cols-container')
|
||||
.children()
|
||||
.first()
|
||||
.within(() => {
|
||||
cy.get('[col-id="status"]').should('contain.text', 'Pending');
|
||||
});
|
||||
});
|
||||
|
||||
// cy.getByTestId(toastCloseBtn).click();
|
||||
cy.highlight('withdrawals verification');
|
||||
cy.getByTestId('toast-complete-withdrawal').click();
|
||||
cy.getByTestId('toast-complete-withdrawal').last().click();
|
||||
|
||||
cy.getByTestId(toastContent, txTimeout).should(
|
||||
'contain.text',
|
||||
@@ -228,9 +216,12 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_GTC,
|
||||
};
|
||||
const rawPrice = removeDecimal(order.price, market.decimalPlaces);
|
||||
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId('Collateral').click();
|
||||
cy.getByTestId('asset', txTimeout).should('contain.text', usdcSymbol);
|
||||
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||
'contain.text',
|
||||
usdcSymbol
|
||||
);
|
||||
|
||||
createOrder(order);
|
||||
|
||||
@@ -290,7 +281,9 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
it('can edit order', function () {
|
||||
const market = this.market;
|
||||
cy.visit(`/#/markets/${market.id}`);
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId(openOrdersTab).click();
|
||||
cy.getByTestId('edit', txTimeout).should('be.visible');
|
||||
cy.getByTestId('edit').first().should('be.visible').click();
|
||||
cy.getByTestId('dialog-title').should('contain.text', 'Edit order');
|
||||
cy.get('#limitPrice').focus().clear().type(newPrice);
|
||||
@@ -318,6 +311,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
it('can cancel order', function () {
|
||||
const market = this.market;
|
||||
cy.visit(`/#/markets/${market.id}`);
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId(openOrdersTab).click();
|
||||
cy.getByTestId('cancel').first().click();
|
||||
cy.getByTestId(toastContent).should(
|
||||
@@ -354,7 +348,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
|
||||
cy.visit('/#/portfolio');
|
||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId('Withdrawals').click();
|
||||
cy.getByTestId('withdraw-dialog-button').click();
|
||||
connectEthereumWallet('Unknown');
|
||||
@@ -365,14 +359,6 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
'contain.text',
|
||||
'Funds unlocked'
|
||||
);
|
||||
cy.getByTestId('tab-withdrawals').within(() => {
|
||||
cy.get('.ag-center-cols-container')
|
||||
.children()
|
||||
.first()
|
||||
.within(() => {
|
||||
cy.get('[col-id="status"]').should('contain.text', 'Pending');
|
||||
});
|
||||
});
|
||||
|
||||
cy.highlight('withdrawals verification');
|
||||
cy.getByTestId('toast-complete-withdrawal').click();
|
||||
@@ -420,11 +406,6 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
.eq(0, txTimeout)
|
||||
.should('contain.text', 'Completed');
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('[col-id="txHash"]', txTimeout)
|
||||
.should('have.length.above', 1)
|
||||
.eq(1)
|
||||
@@ -454,6 +435,7 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
// 1001-DEPO-007
|
||||
cy.visit('/#/portfolio');
|
||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId(depositsTab).click();
|
||||
cy.getByTestId('deposit-button').click();
|
||||
connectEthereumWallet('Unknown');
|
||||
@@ -474,8 +456,8 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
// 1002-WITH-007
|
||||
|
||||
cy.visit('/#/portfolio');
|
||||
cy.get('main[data-testid="/portfolio"]').should('exist');
|
||||
|
||||
cy.get('main[data-testid="/portfolio"]', txTimeout).should('exist');
|
||||
cy.getByTestId(toastCloseBtn, txTimeout).click();
|
||||
cy.getByTestId(depositsTab).click();
|
||||
cy.getByTestId('deposit-button').click();
|
||||
connectEthereumWallet('Unknown');
|
||||
@@ -497,16 +479,14 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
|
||||
cy.highlight('deposit verification');
|
||||
|
||||
cy.getByTestId('asset', txTimeout).should('contain.text', vegaSymbol);
|
||||
cy.get('[col-id="asset.symbol"]', txTimeout).should(
|
||||
'contain.text',
|
||||
vegaSymbol
|
||||
);
|
||||
cy.getByTestId(depositsTab).click();
|
||||
cy.get('.ag-cell-value', txTimeout).should('contain.text', vegaSymbol);
|
||||
cy.get('[col-id="status"]').should('not.have.text', 'Open', txTimeout);
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('[col-id="txHash"]')
|
||||
.should('have.length.above', 2)
|
||||
.eq(1)
|
||||
@@ -535,6 +515,16 @@ describe('capsule', { tags: '@slow', testIsolation: true }, () => {
|
||||
cy.getByTestId(toastCloseBtn).click();
|
||||
cy.getByTestId(completeWithdrawalBtn).first().should('be.visible').click();
|
||||
cy.getByTestId(toastContent, txTimeout).should('contain.text', 'Delayed');
|
||||
cy.getByTestId('tab-withdrawals').within(() => {
|
||||
cy.get('.ag-center-cols-container')
|
||||
.children()
|
||||
.first()
|
||||
.within(() => {
|
||||
cy.get('[col-id="status"]').contains(
|
||||
/Delayed \(ready in (\d{1,2}:\d{2}:\d{2}:\d{2})\)/
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -137,11 +137,6 @@ describe('Market trading page', () => {
|
||||
.realHover();
|
||||
});
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(expirtyTooltip)
|
||||
.eq(0)
|
||||
.should(
|
||||
@@ -175,11 +170,6 @@ describe('Market trading page', () => {
|
||||
.realHover();
|
||||
});
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(tradingModeTooltip)
|
||||
.should(
|
||||
'contain.text',
|
||||
@@ -206,11 +196,6 @@ describe('Market trading page', () => {
|
||||
cy.getByTestId(itemValue).realHover();
|
||||
});
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId(liquiditySuppliedTooltip)
|
||||
.should('contain.text', 'Supplied stake')
|
||||
.and('contain.text', 'Target stake')
|
||||
|
||||
@@ -16,7 +16,7 @@ const orderStatus = 'status';
|
||||
const orderRemaining = 'remaining';
|
||||
const orderPrice = 'price';
|
||||
const orderTimeInForce = 'timeInForce';
|
||||
const orderCreatedAt = 'createdAt';
|
||||
const orderUpdatedAt = 'updatedAt';
|
||||
const cancelOrderBtn = 'cancel';
|
||||
const cancelAllOrdersBtn = 'cancelAll';
|
||||
const editOrderBtn = 'edit';
|
||||
@@ -46,6 +46,10 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
|
||||
cy.wrap($symbol).invoke('text').should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(`[col-id='${orderRemaining}']`).each(($remaining) => {
|
||||
cy.wrap($remaining).invoke('text').should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(`[col-id='${orderSize}']`).each(($size) => {
|
||||
cy.wrap($size).invoke('text').should('not.be.empty');
|
||||
});
|
||||
@@ -58,10 +62,6 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
|
||||
cy.wrap($status).invoke('text').should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(`[col-id='${orderRemaining}']`).each(($remaining) => {
|
||||
cy.wrap($remaining).invoke('text').should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(`[col-id='${orderPrice}']`).each(($price) => {
|
||||
cy.wrap($price).invoke('text').should('not.be.empty');
|
||||
});
|
||||
@@ -70,7 +70,7 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
|
||||
cy.wrap($timeInForce).invoke('text').should('not.be.empty');
|
||||
});
|
||||
|
||||
cy.get(`[col-id='${orderCreatedAt}']`).each(($dateTime) => {
|
||||
cy.get(`[col-id='${orderUpdatedAt}']`).each(($dateTime) => {
|
||||
cy.wrap($dateTime).invoke('text').should('not.be.empty');
|
||||
});
|
||||
});
|
||||
@@ -96,7 +96,8 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
|
||||
'have.text',
|
||||
'Partially Filled'
|
||||
);
|
||||
cy.get(`[col-id='${orderRemaining}']`).should('have.text', '7/10');
|
||||
cy.get(`[col-id='${orderRemaining}']`).should('have.text', '7');
|
||||
cy.get(`[col-id='${orderSize}']`).should('have.text', '-10');
|
||||
cy.getByTestId(cancelOrderBtn).should('not.exist');
|
||||
cy.getByTestId(editOrderBtn).should('not.exist');
|
||||
});
|
||||
@@ -118,11 +119,6 @@ describe('orders list', { tags: '@smoke', testIsolation: true }, () => {
|
||||
cy.contains('Reset').click();
|
||||
cy.getByTestId('All').click();
|
||||
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.getByTestId('tab-orders')
|
||||
.get(`.ag-center-cols-container [col-id='${orderSymbol}']`)
|
||||
.should('have.length.at.least', expectedOrderList.length)
|
||||
@@ -219,7 +215,7 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
|
||||
cy.getByTestId(`order-status-${orderId}`)
|
||||
.parentsUntil(`.ag-row`)
|
||||
.siblings(`[col-id=${orderRemaining}]`)
|
||||
.should('have.text', '4/5');
|
||||
.should('have.text', '4');
|
||||
});
|
||||
|
||||
it('must see a filled order', () => {
|
||||
@@ -267,7 +263,7 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
|
||||
status: Schema.OrderStatus.STATUS_ACTIVE,
|
||||
});
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find('[col-id="size"]')
|
||||
.find(`[col-id="${orderSize}"]`)
|
||||
.should('have.text', '-15');
|
||||
});
|
||||
|
||||
@@ -281,7 +277,7 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
|
||||
status: Schema.OrderStatus.STATUS_ACTIVE,
|
||||
});
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find('[col-id="size"]')
|
||||
.find(`[col-id="${orderSize}"]`)
|
||||
.should('have.text', '+5');
|
||||
});
|
||||
|
||||
@@ -364,7 +360,7 @@ describe('subscribe orders', { tags: '@smoke' }, () => {
|
||||
});
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find(`[col-id='${orderTimeInForce}']`)
|
||||
.should('have.text', "Good 'til Cancelled (GTC)");
|
||||
.should('have.text', 'GTC');
|
||||
});
|
||||
|
||||
it('for Active order when is part of a liquidity or peg shape, must not see an option to amend the individual order ', () => {
|
||||
@@ -446,11 +442,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
peggedOrder: null,
|
||||
liquidityProvisionId: null,
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find('[data-testid="edit"]')
|
||||
.should('have.text', 'Edit')
|
||||
@@ -480,11 +471,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
peggedOrder: null,
|
||||
liquidityProvisionId: null,
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find(`[data-testid="cancel"]`)
|
||||
.should('have.text', 'Cancel')
|
||||
@@ -507,11 +493,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
peggedOrder: null,
|
||||
liquidityProvisionId: null,
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(`[data-testid="cancelAll"]`)
|
||||
.should('have.text', 'Cancel all')
|
||||
.then(($btn) => {
|
||||
@@ -528,11 +509,6 @@ describe('amend and cancel order', { tags: '@smoke' }, () => {
|
||||
peggedOrder: null,
|
||||
liquidityProvisionId: null,
|
||||
});
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get(`[row-id=${orderId}]`)
|
||||
.find('[data-testid="edit"]')
|
||||
.should('have.text', 'Edit')
|
||||
|
||||
@@ -47,11 +47,6 @@ describe('Portfolio page', { tags: '@smoke' }, () => {
|
||||
cy.get(
|
||||
'[role="columnheader"][col-id="fromAccountType"] .ag-header-cell-menu-button'
|
||||
).click();
|
||||
/**
|
||||
* TODO(@nx/cypress): Nesting Cypress commands in a should assertion now throws.
|
||||
* You should use .then() to chain commands instead.
|
||||
* More Info: https://docs.cypress.io/guides/references/migration-guide#-should
|
||||
**/
|
||||
cy.get('fieldset.ag-simple-filter-body-wrapper')
|
||||
.should('be.visible')
|
||||
.within((fields) => {
|
||||
|
||||
@@ -267,22 +267,22 @@ describe('positions', { tags: '@regression', testIsolation: true }, () => {
|
||||
cy.get('.ag-center-cols-container').within(() => {
|
||||
assertPNLColor(
|
||||
'[col-id="realisedPNL"]',
|
||||
'text-vega-green',
|
||||
'text-vega-pink'
|
||||
'text-market-green-600',
|
||||
'text-market-red'
|
||||
);
|
||||
});
|
||||
cy.get('.ag-center-cols-container').within(() => {
|
||||
assertPNLColor(
|
||||
'[col-id="unrealisedPNL"]',
|
||||
'text-vega-green',
|
||||
'text-vega-pink'
|
||||
'text-market-green-600',
|
||||
'text-market-red'
|
||||
);
|
||||
});
|
||||
cy.get('.ag-center-cols-container').within(() => {
|
||||
assertPNLColor(
|
||||
'[col-id="openVolume"]',
|
||||
'text-vega-green',
|
||||
'text-vega-pink'
|
||||
'text-market-green-600',
|
||||
'text-market-red'
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -160,8 +160,9 @@ const DataRow = ({
|
||||
const PriceChange = ({ candles }: { candles: string[] }) => {
|
||||
const priceChange = candles ? priceChangePercentage(candles) : undefined;
|
||||
const priceChangeClasses = classNames('text-xs', {
|
||||
'text-vega-pink': priceChange && priceChange < 0,
|
||||
'text-vega-green': priceChange && priceChange > 0,
|
||||
'text-market-red': priceChange && priceChange < 0,
|
||||
'text-market-green-600 dark:text-market-green':
|
||||
priceChange && priceChange > 0,
|
||||
});
|
||||
let prefix = '';
|
||||
if (priceChange && priceChange > 0) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export type AccountHistoryQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type AccountHistoryQuery = { __typename?: 'Query', balanceChanges: { __typename?: 'AggregatedBalanceConnection', edges: Array<{ __typename?: 'AggregatedBalanceEdge', node: { __typename?: 'AggregatedBalance', timestamp: any, partyId?: string | null, balance: string, marketId?: string | null, assetId?: string | null, accountType?: Types.AccountType | null } } | null> } };
|
||||
export type AccountHistoryQuery = { __typename: 'Query', balanceChanges: { __typename: 'AggregatedBalanceConnection', edges: Array<{ __typename: 'AggregatedBalanceEdge', node: { __typename: 'AggregatedBalance', timestamp: any, partyId?: string | null, balance: string, marketId?: string | null, assetId?: string | null, accountType?: Types.AccountType | null } } | null> } };
|
||||
|
||||
export type AccountsWithBalanceQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -20,7 +20,7 @@ export type AccountsWithBalanceQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type AccountsWithBalanceQuery = { __typename?: 'Query', balanceChanges: { __typename?: 'AggregatedBalanceConnection', edges: Array<{ __typename?: 'AggregatedBalanceEdge', node: { __typename?: 'AggregatedBalance', assetId?: string | null, accountType?: Types.AccountType | null } } | null> } };
|
||||
export type AccountsWithBalanceQuery = { __typename: 'Query', balanceChanges: { __typename: 'AggregatedBalanceConnection', edges: Array<{ __typename: 'AggregatedBalanceEdge', node: { __typename: 'AggregatedBalance', assetId?: string | null, accountType?: Types.AccountType | null } } | null> } };
|
||||
|
||||
|
||||
export const AccountHistoryDocument = gql`
|
||||
|
||||
@@ -29,51 +29,49 @@ html.dark {
|
||||
|
||||
/* PENNANT */
|
||||
|
||||
html [data-theme='dark'] {
|
||||
--pennant-color-danger: theme('colors.vega.pink.DEFAULT');
|
||||
|
||||
/* candles */
|
||||
--pennant-color-buy-fill: theme('colors.vega.green.650');
|
||||
--pennant-color-buy-stroke: theme('colors.vega.green.500');
|
||||
html [data-theme='dark'],
|
||||
html [data-theme='light'] {
|
||||
/* sell candles only use stroke as the candle is solid (without border) */
|
||||
--pennant-color-sell-stroke: theme('colors.vega.pink.500');
|
||||
--pennant-color-sell-stroke: theme('colors.market.red.500');
|
||||
|
||||
/* studies */
|
||||
--pennant-color-eldar-ray-bear-power: theme('colors.vega.pink.500');
|
||||
--pennant-color-eldar-ray-bull-power: theme('colors.vega.green.650');
|
||||
--pennant-color-eldar-ray-bear-power: theme('colors.market.red.500');
|
||||
--pennant-color-eldar-ray-bull-power: theme('colors.market.green.600');
|
||||
|
||||
--pennant-color-macd-divergence-buy: theme('colors.vega.green.650');
|
||||
--pennant-color-macd-divergence-sell: theme('colors.vega.pink.500');
|
||||
--pennant-color-macd-divergence-buy: theme('colors.market.green.600');
|
||||
--pennant-color-macd-divergence-sell: theme('colors.market.red.500');
|
||||
--pennant-color-macd-signal: theme('colors.vega.blue.500');
|
||||
--pennant-color-macd-macd: theme('colors.vega.yellow.500');
|
||||
|
||||
--pennant-color-volume-buy: theme('colors.vega.green.650');
|
||||
--pennant-color-volume-sell: theme('colors.vega.pink.500');
|
||||
|
||||
/* depth chart */
|
||||
--pennant-color-depth-buy-fill: theme('colors.vega.green.650');
|
||||
--pennant-color-depth-buy-stroke: theme('colors.vega.green.500');
|
||||
--pennant-color-depth-sell-fill: theme('colors.vega.pink.650');
|
||||
--pennant-color-depth-sell-stroke: theme('colors.vega.pink.500');
|
||||
--pennant-color-volume-sell: theme('colors.market.red.500');
|
||||
}
|
||||
|
||||
html [data-theme='light'] {
|
||||
--pennant-color-danger: theme('colors.vega.pink.500');
|
||||
|
||||
/* candles */
|
||||
--pennant-color-buy-fill: theme('colors.vega.green.400');
|
||||
--pennant-color-buy-stroke: theme('colors.vega.green.550');
|
||||
/* sell candles only use stroke as the candle is solid (without border) */
|
||||
--pennant-color-sell-stroke: theme('colors.vega.pink.400');
|
||||
|
||||
--pennant-color-volume-buy: theme('colors.vega.green.400');
|
||||
--pennant-color-volume-sell: theme('colors.vega.pink.400');
|
||||
--pennant-color-buy-fill: theme('colors.market.green.500');
|
||||
--pennant-color-buy-stroke: theme('colors.market.green.600');
|
||||
|
||||
/* depth chart */
|
||||
--pennant-color-depth-buy-fill: theme('colors.vega.green.400');
|
||||
--pennant-color-depth-buy-stroke: theme('colors.vega.green.550');
|
||||
--pennant-color-depth-sell-fill: theme('colors.vega.pink.400');
|
||||
--pennant-color-depth-sell-stroke: theme('colors.vega.pink.550');
|
||||
--pennant-color-depth-buy-fill: theme('colors.market.green.500');
|
||||
--pennant-color-depth-buy-stroke: theme('colors.market.green.600');
|
||||
--pennant-color-depth-sell-fill: theme('colors.market.red.500');
|
||||
--pennant-color-depth-sell-stroke: theme('colors.market.red.600');
|
||||
|
||||
--pennant-color-volume-buy: theme('colors.market.green.500');
|
||||
}
|
||||
|
||||
html [data-theme='dark'] {
|
||||
/* candles */
|
||||
--pennant-color-buy-fill: theme('colors.market.green.600');
|
||||
--pennant-color-buy-stroke: theme('colors.market.green.500');
|
||||
|
||||
/* depth chart */
|
||||
--pennant-color-depth-buy-fill: theme('colors.market.green.600');
|
||||
--pennant-color-depth-buy-stroke: theme('colors.market.green.500');
|
||||
--pennant-color-depth-sell-fill: theme('colors.market.red.600');
|
||||
--pennant-color-depth-sell-stroke: theme('colors.market.red.500');
|
||||
|
||||
--pennant-color-volume-buy: theme('colors.market.green.600');
|
||||
}
|
||||
|
||||
/* AG GRID - Do not edit without updating other global stylesheets for each app */
|
||||
|
||||
+3
-3
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type AccountFieldsFragment = { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string }, party?: { __typename?: 'Party', id: string } | null };
|
||||
export type AccountFieldsFragment = { __typename: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename: 'Market', id: string } | null, asset: { __typename: 'Asset', id: string }, party?: { __typename: 'Party', id: string } | null };
|
||||
|
||||
export type AccountsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type AccountsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename?: 'Market', id: string } | null, asset: { __typename?: 'Asset', id: string }, party?: { __typename?: 'Party', id: string } | null } } | null> | null } | null } | null };
|
||||
export type AccountsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, accountsConnection?: { __typename: 'AccountsConnection', edges?: Array<{ __typename: 'AccountEdge', node: { __typename: 'AccountBalance', type: Types.AccountType, balance: string, market?: { __typename: 'Market', id: string } | null, asset: { __typename: 'Asset', id: string }, party?: { __typename: 'Party', id: string } | null } } | null> | null } | null } | null };
|
||||
|
||||
export type AccountEventsSubscriptionVariables = Types.Exact<{
|
||||
partyId?: Types.InputMaybe<Types.Scalars['ID']>;
|
||||
}>;
|
||||
|
||||
|
||||
export type AccountEventsSubscription = { __typename?: 'Subscription', accounts: Array<{ __typename?: 'AccountUpdate', type: Types.AccountType, balance: string, assetId: string, marketId?: string | null, partyId: string }> };
|
||||
export type AccountEventsSubscription = { __typename: 'Subscription', accounts: Array<{ __typename: 'AccountUpdate', type: Types.AccountType, balance: string, assetId: string, marketId?: string | null, partyId: string }> };
|
||||
|
||||
export const AccountFieldsFragmentDoc = gql`
|
||||
fragment AccountFields on AccountBalance {
|
||||
|
||||
+3
-3
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type MarginFieldsFragment = { __typename?: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, asset: { __typename?: 'Asset', id: string }, market: { __typename?: 'Market', id: string } };
|
||||
export type MarginFieldsFragment = { __typename: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, asset: { __typename: 'Asset', id: string }, market: { __typename: 'Market', id: string } };
|
||||
|
||||
export type MarginsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarginsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, marginsConnection?: { __typename?: 'MarginConnection', edges?: Array<{ __typename?: 'MarginEdge', node: { __typename?: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, asset: { __typename?: 'Asset', id: string }, market: { __typename?: 'Market', id: string } } }> | null } | null } | null };
|
||||
export type MarginsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, marginsConnection?: { __typename: 'MarginConnection', edges?: Array<{ __typename: 'MarginEdge', node: { __typename: 'MarginLevels', maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, asset: { __typename: 'Asset', id: string }, market: { __typename: 'Market', id: string } } }> | null } | null } | null };
|
||||
|
||||
export type MarginsSubscriptionSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarginsSubscriptionSubscription = { __typename?: 'Subscription', margins: { __typename?: 'MarginLevelsUpdate', marketId: string, asset: string, partyId: string, maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, timestamp: any } };
|
||||
export type MarginsSubscriptionSubscription = { __typename: 'Subscription', margins: { __typename: 'MarginLevelsUpdate', marketId: string, asset: string, partyId: string, maintenanceLevel: string, searchLevel: string, initialLevel: string, collateralReleaseLevel: string, timestamp: any } };
|
||||
|
||||
export const MarginFieldsFragmentDoc = gql`
|
||||
fragment MarginFields on MarginLevels {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import type { AppNameType, Announcement } from './schema';
|
||||
import { useAnnouncement } from './hooks/use-announcement';
|
||||
import {
|
||||
useAnnouncement,
|
||||
useDismissedAnnouncement,
|
||||
} from './hooks/use-announcement';
|
||||
import {
|
||||
AnnouncementBanner as Banner,
|
||||
ExternalLink,
|
||||
@@ -36,6 +39,7 @@ export const AnnouncementBanner = ({
|
||||
}: AnnouncementBannerProps) => {
|
||||
const [isVisible, setVisible] = useState(false);
|
||||
const { data, reload } = useAnnouncement(app, configUrl);
|
||||
const [, setDismissed] = useDismissedAnnouncement();
|
||||
|
||||
useEffect(() => {
|
||||
const now = new Date();
|
||||
@@ -88,7 +92,10 @@ export const AnnouncementBanner = ({
|
||||
<button
|
||||
className="absolute right-0 top-0 p-4 w-10 h-full flex items-center justify-center text-white"
|
||||
data-testid="app-announcement-close"
|
||||
onClick={() => setVisible(false)}
|
||||
onClick={() => {
|
||||
setVisible(false);
|
||||
setDismissed(data);
|
||||
}}
|
||||
>
|
||||
<VegaIcon name={VegaIconNames.CROSS} size={24} />
|
||||
</button>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import type { AppNameType, Announcement } from '../schema';
|
||||
import { AnnouncementsSchema } from '../schema';
|
||||
import { sha256 } from 'ethers/lib/utils';
|
||||
import { useLocalStorageSnapshot } from '@vegaprotocol/react-helpers';
|
||||
|
||||
const getData = async (name: AppNameType, url: string) => {
|
||||
const now = new Date();
|
||||
@@ -31,6 +33,22 @@ type State = {
|
||||
error: null | string;
|
||||
};
|
||||
|
||||
const checksum = (data: object) => sha256(Buffer.from(JSON.stringify(data)));
|
||||
|
||||
export const useDismissedAnnouncement = (): [
|
||||
string | null | undefined,
|
||||
(data: object) => void
|
||||
] => {
|
||||
const [dismissed, setDismissedInStorage] = useLocalStorageSnapshot(
|
||||
'dismissed-announcement'
|
||||
);
|
||||
const setDismissed = useCallback(
|
||||
(data: object) => setDismissedInStorage(checksum(data)),
|
||||
[setDismissedInStorage]
|
||||
);
|
||||
return [dismissed, setDismissed];
|
||||
};
|
||||
|
||||
export const useAnnouncement = (name: AppNameType, url: string) => {
|
||||
const [state, setState] = useState<State>({
|
||||
loading: true,
|
||||
@@ -38,12 +56,14 @@ export const useAnnouncement = (name: AppNameType, url: string) => {
|
||||
error: null,
|
||||
});
|
||||
|
||||
const [dismissed] = useDismissedAnnouncement();
|
||||
|
||||
const fetchData = useCallback(() => {
|
||||
let mounted = true;
|
||||
|
||||
getData(name, url)
|
||||
.then((data) => {
|
||||
if (mounted) {
|
||||
if (mounted && dismissed !== checksum(data)) {
|
||||
setState({
|
||||
loading: false,
|
||||
data,
|
||||
@@ -64,7 +84,7 @@ export const useAnnouncement = (name: AppNameType, url: string) => {
|
||||
return () => {
|
||||
mounted = false;
|
||||
};
|
||||
}, [name, url, setState]);
|
||||
}, [name, url, dismissed]);
|
||||
|
||||
useEffect(() => {
|
||||
fetchData();
|
||||
|
||||
+2
-2
@@ -3,14 +3,14 @@ import * 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?: '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 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?: '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 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 {
|
||||
|
||||
+2
-2
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type AssetListFieldsFragment = { __typename?: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string } };
|
||||
export type AssetListFieldsFragment = { __typename: 'Asset', id: string, name: string, symbol: string, decimals: number, quantum: string, status: Types.AssetStatus, source: { __typename: 'BuiltinAsset' } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string } };
|
||||
|
||||
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' } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string } } } | 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' } | { __typename: 'ERC20', contractAddress: string, lifetimeLimit: string, withdrawThreshold: string } } } | null> | null } | null };
|
||||
|
||||
export const AssetListFieldsFragmentDoc = gql`
|
||||
fragment AssetListFields on Asset {
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type CandleFieldsFragment = { __typename?: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string };
|
||||
export type CandleFieldsFragment = { __typename: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string };
|
||||
|
||||
export type CandlesQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
@@ -12,7 +12,7 @@ export type CandlesQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type CandlesQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string } }, candlesConnection?: { __typename?: 'CandleDataConnection', edges?: Array<{ __typename?: 'CandleEdge', node: { __typename?: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string } } | null> | null } | null } | null };
|
||||
export type CandlesQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', id: string, name: string, code: string } }, candlesConnection?: { __typename: 'CandleDataConnection', edges?: Array<{ __typename: 'CandleEdge', node: { __typename: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string } } | null> | null } | null } | null };
|
||||
|
||||
export type CandlesEventsSubscriptionVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
@@ -20,7 +20,7 @@ export type CandlesEventsSubscriptionVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type CandlesEventsSubscription = { __typename?: 'Subscription', candles: { __typename?: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string } };
|
||||
export type CandlesEventsSubscription = { __typename: 'Subscription', candles: { __typename: 'Candle', periodStart: any, lastUpdateInPeriod: any, high: string, low: string, open: string, close: string, volume: string } };
|
||||
|
||||
export const CandleFieldsFragmentDoc = gql`
|
||||
fragment CandleFields on Candle {
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ export type ChartQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type ChartQuery = { __typename?: 'Query', market?: { __typename?: 'Market', decimalPlaces: number, positionDecimalPlaces: number, data?: { __typename?: 'MarketData', priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string }> | null } | null } | null };
|
||||
export type ChartQuery = { __typename: 'Query', market?: { __typename: 'Market', decimalPlaces: number, positionDecimalPlaces: number, data?: { __typename: 'MarketData', priceMonitoringBounds?: Array<{ __typename: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string }> | null } | null } | null };
|
||||
|
||||
|
||||
export const ChartDocument = gql`
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
export const positiveClassNames = 'text-vega-green-550 dark:text-vega-green';
|
||||
export const negativeClassNames = 'text-vega-pink dark:text-vega-pink';
|
||||
export const positiveClassNames =
|
||||
'text-market-green-600 dark:text-market-green';
|
||||
export const negativeClassNames = 'text-market-red dark:text-market-red';
|
||||
|
||||
const isPositive = ({ value }: { value: string | bigint | number }) =>
|
||||
!!value &&
|
||||
|
||||
@@ -71,8 +71,8 @@ export const FlashCell = memo(({ children, value }: FlashCellProps) => {
|
||||
if (value < previousValue) {
|
||||
ref.current?.animate(
|
||||
[
|
||||
{ color: theme.colors.vega.pink.DEFAULT },
|
||||
{ color: theme.colors.vega.pink.DEFAULT, offset: 0.8 },
|
||||
{ color: theme.colors.market.red.DEFAULT },
|
||||
{ color: theme.colors.market.red.DEFAULT, offset: 0.8 },
|
||||
{ color: 'inherit' },
|
||||
],
|
||||
FLASH_DURATION
|
||||
@@ -80,8 +80,8 @@ export const FlashCell = memo(({ children, value }: FlashCellProps) => {
|
||||
} else if (value > previousValue) {
|
||||
ref.current?.animate(
|
||||
[
|
||||
{ color: theme.colors.vega.green.DEFAULT },
|
||||
{ color: theme.colors.vega.green.DEFAULT, offset: 0.8 },
|
||||
{ color: theme.colors.market.green.DEFAULT },
|
||||
{ color: theme.colors.market.green.DEFAULT, offset: 0.8 },
|
||||
{ color: 'inherit' },
|
||||
],
|
||||
FLASH_DURATION
|
||||
|
||||
@@ -19,19 +19,14 @@ export const Size = ({
|
||||
data-testid="size"
|
||||
className={classNames('text-right', {
|
||||
// BUY
|
||||
'text-vega-green-550 dark:text-vega-green':
|
||||
'text-market-green-600 dark:text-market-green':
|
||||
side === Schema.Side.SIDE_BUY && !forceTheme,
|
||||
'text-vega-green-550':
|
||||
'text-market-green-600':
|
||||
side === Schema.Side.SIDE_BUY && forceTheme === 'light',
|
||||
'text-vega-green':
|
||||
'text-market-green':
|
||||
side === Schema.Side.SIDE_BUY && forceTheme === 'dark',
|
||||
// SELL
|
||||
'text-vega-pink-550 dark:text-vega-pink':
|
||||
side === Schema.Side.SIDE_SELL && !forceTheme,
|
||||
'text-vega-pink-550':
|
||||
side === Schema.Side.SIDE_SELL && forceTheme === 'light',
|
||||
'text-vega-pink':
|
||||
side === Schema.Side.SIDE_SELL && forceTheme === 'dark',
|
||||
'text-market-red': side === Schema.Side.SIDE_SELL,
|
||||
})}
|
||||
>
|
||||
{side === Schema.Side.SIDE_BUY
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export type EstimateFeesQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type EstimateFeesQuery = { __typename?: 'Query', estimateFees: { __typename?: 'FeeEstimate', totalFeeAmount: string, fees: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } };
|
||||
export type EstimateFeesQuery = { __typename: 'Query', estimateFees: { __typename: 'FeeEstimate', totalFeeAmount: string, fees: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } };
|
||||
|
||||
|
||||
export const EstimateFeesDocument = gql`
|
||||
|
||||
+3
-3
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type DepositFieldsFragment = { __typename?: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } };
|
||||
export type DepositFieldsFragment = { __typename: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename: 'Asset', id: string, symbol: string, decimals: number } };
|
||||
|
||||
export type DepositsQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type DepositsQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, depositsConnection?: { __typename?: 'DepositsConnection', edges?: Array<{ __typename?: 'DepositEdge', node: { __typename?: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } } } | null> | null } | null } | null };
|
||||
export type DepositsQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, depositsConnection?: { __typename: 'DepositsConnection', edges?: Array<{ __typename: 'DepositEdge', node: { __typename: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename: 'Asset', id: string, symbol: string, decimals: number } } } | null> | null } | null } | null };
|
||||
|
||||
export type DepositEventSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type DepositEventSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', event: { __typename?: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename?: 'Asset', id: string, symbol: string, decimals: number } } | { __typename?: 'TimeUpdate' } | { __typename?: 'TransactionResult' } | { __typename?: 'Withdrawal' } }> | null };
|
||||
export type DepositEventSubscription = { __typename: 'Subscription', busEvents?: Array<{ __typename: 'BusEvent', event: { __typename: 'Deposit', id: string, status: Types.DepositStatus, amount: string, createdTimestamp: any, creditedTimestamp?: any | null, txHash?: string | null, asset: { __typename: 'Asset', id: string, symbol: string, decimals: number } } | { __typename: 'TimeUpdate' } | { __typename: 'TransactionResult' } | { __typename: 'Withdrawal' } }> | null };
|
||||
|
||||
export const DepositFieldsFragmentDoc = gql`
|
||||
fragment DepositFields on Deposit {
|
||||
|
||||
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type NodeGuardQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NodeGuardQuery = { __typename?: 'Query', lastBlockHeight: string, networkParametersConnection: { __typename?: 'NetworkParametersConnection', edges?: Array<{ __typename?: 'NetworkParameterEdge', node: { __typename?: 'NetworkParameter', key: string, value: string } } | null> | null } };
|
||||
export type NodeGuardQuery = { __typename: 'Query', lastBlockHeight: string, networkParametersConnection: { __typename: 'NetworkParametersConnection', edges?: Array<{ __typename: 'NetworkParameterEdge', node: { __typename: 'NetworkParameter', key: string, value: string } } | null> | null } };
|
||||
|
||||
|
||||
export const NodeGuardDocument = gql`
|
||||
|
||||
+2
-2
@@ -6,12 +6,12 @@ const defaultOptions = {} as const;
|
||||
export type NodeCheckQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NodeCheckQuery = { __typename?: 'Query', statistics: { __typename?: 'Statistics', chainId: string, blockHeight: string, vegaTime: any } };
|
||||
export type NodeCheckQuery = { __typename: 'Query', statistics: { __typename: 'Statistics', chainId: string, blockHeight: string, vegaTime: any } };
|
||||
|
||||
export type NodeCheckTimeUpdateSubscriptionVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NodeCheckTimeUpdateSubscription = { __typename?: 'Subscription', busEvents?: Array<{ __typename?: 'BusEvent', id: string }> | null };
|
||||
export type NodeCheckTimeUpdateSubscription = { __typename: 'Subscription', busEvents?: Array<{ __typename: 'BusEvent', id: string }> | null };
|
||||
|
||||
|
||||
export const NodeCheckDocument = gql`
|
||||
|
||||
+5
-5
@@ -3,9 +3,9 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type FillFieldsFragment = { __typename?: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename?: 'Market', id: string }, buyer: { __typename?: 'Party', id: string }, seller: { __typename?: 'Party', id: string }, buyerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } };
|
||||
export type FillFieldsFragment = { __typename: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename: 'Market', id: string }, buyer: { __typename: 'Party', id: string }, seller: { __typename: 'Party', id: string }, buyerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } };
|
||||
|
||||
export type FillEdgeFragment = { __typename?: 'TradeEdge', cursor: string, node: { __typename?: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename?: 'Market', id: string }, buyer: { __typename?: 'Party', id: string }, seller: { __typename?: 'Party', id: string }, buyerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } };
|
||||
export type FillEdgeFragment = { __typename: 'TradeEdge', cursor: string, node: { __typename: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename: 'Market', id: string }, buyer: { __typename: 'Party', id: string }, seller: { __typename: 'Party', id: string }, buyerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } };
|
||||
|
||||
export type FillsQueryVariables = Types.Exact<{
|
||||
filter?: Types.InputMaybe<Types.TradesFilter>;
|
||||
@@ -13,16 +13,16 @@ export type FillsQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type FillsQuery = { __typename?: 'Query', trades?: { __typename?: 'TradeConnection', edges: Array<{ __typename?: 'TradeEdge', cursor: string, node: { __typename?: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename?: 'Market', id: string }, buyer: { __typename?: 'Party', id: string }, seller: { __typename?: 'Party', id: string }, buyerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } }>, pageInfo: { __typename?: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } } | null };
|
||||
export type FillsQuery = { __typename: 'Query', trades?: { __typename: 'TradeConnection', edges: Array<{ __typename: 'TradeEdge', cursor: string, node: { __typename: 'Trade', id: string, createdAt: any, price: string, size: string, buyOrder: string, sellOrder: string, aggressor: Types.Side, market: { __typename: 'Market', id: string }, buyer: { __typename: 'Party', id: string }, seller: { __typename: 'Party', id: string }, buyerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } } }>, pageInfo: { __typename: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } } | null };
|
||||
|
||||
export type FillUpdateFieldsFragment = { __typename?: 'TradeUpdate', id: string, marketId: string, buyOrder: string, sellOrder: string, buyerId: string, sellerId: string, aggressor: Types.Side, price: string, size: string, createdAt: any, type: Types.TradeType, buyerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } };
|
||||
export type FillUpdateFieldsFragment = { __typename: 'TradeUpdate', id: string, marketId: string, buyOrder: string, sellOrder: string, buyerId: string, sellerId: string, aggressor: Types.Side, price: string, size: string, createdAt: any, type: Types.TradeType, buyerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } };
|
||||
|
||||
export type FillsEventSubscriptionVariables = Types.Exact<{
|
||||
filter: Types.TradesSubscriptionFilter;
|
||||
}>;
|
||||
|
||||
|
||||
export type FillsEventSubscription = { __typename?: 'Subscription', tradesStream?: Array<{ __typename?: 'TradeUpdate', id: string, marketId: string, buyOrder: string, sellOrder: string, buyerId: string, sellerId: string, aggressor: Types.Side, price: string, size: string, createdAt: any, type: Types.TradeType, buyerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename?: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } }> | null };
|
||||
export type FillsEventSubscription = { __typename: 'Subscription', tradesStream?: Array<{ __typename: 'TradeUpdate', id: string, marketId: string, buyOrder: string, sellOrder: string, buyerId: string, sellerId: string, aggressor: Types.Side, price: string, size: string, createdAt: any, type: Types.TradeType, buyerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string }, sellerFee: { __typename: 'TradeFee', makerFee: string, infrastructureFee: string, liquidityFee: string } }> | null };
|
||||
|
||||
export const FillFieldsFragmentDoc = gql`
|
||||
fragment FillFields on Trade {
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('FillsTable', () => {
|
||||
});
|
||||
|
||||
const amountCell = cells.find((c) => c.getAttribute('col-id') === 'size');
|
||||
expect(amountCell).toHaveClass('text-vega-green-550');
|
||||
expect(amountCell).toHaveClass('text-market-green-600');
|
||||
});
|
||||
|
||||
it('should format cells correctly for seller fill', async () => {
|
||||
@@ -120,7 +120,7 @@ describe('FillsTable', () => {
|
||||
});
|
||||
|
||||
const amountCell = cells.find((c) => c.getAttribute('col-id') === 'size');
|
||||
expect(amountCell).toHaveClass('text-vega-pink');
|
||||
expect(amountCell).toHaveClass('text-market-red');
|
||||
});
|
||||
|
||||
it('should format cells correctly for side unspecified', async () => {
|
||||
@@ -155,7 +155,7 @@ describe('FillsTable', () => {
|
||||
});
|
||||
|
||||
const amountCell = cells.find((c) => c.getAttribute('col-id') === 'size');
|
||||
expect(amountCell).toHaveClass('text-vega-pink');
|
||||
expect(amountCell).toHaveClass('text-market-red');
|
||||
});
|
||||
|
||||
it('should render correct maker or taker role', async () => {
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type LedgerEntryFragment = { __typename?: 'AggregatedLedgerEntry', vegaTime: any, quantity: string, assetId?: string | null, transferType?: Types.TransferType | null, toAccountType?: Types.AccountType | null, toAccountMarketId?: string | null, toAccountPartyId?: string | null, toAccountBalance: string, fromAccountType?: Types.AccountType | null, fromAccountMarketId?: string | null, fromAccountPartyId?: string | null, fromAccountBalance: string };
|
||||
export type LedgerEntryFragment = { __typename: 'AggregatedLedgerEntry', vegaTime: any, quantity: string, assetId?: string | null, transferType?: Types.TransferType | null, toAccountType?: Types.AccountType | null, toAccountMarketId?: string | null, toAccountPartyId?: string | null, toAccountBalance: string, fromAccountType?: Types.AccountType | null, fromAccountMarketId?: string | null, fromAccountPartyId?: string | null, fromAccountBalance: string };
|
||||
|
||||
export type LedgerEntriesQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -14,7 +14,7 @@ export type LedgerEntriesQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type LedgerEntriesQuery = { __typename?: 'Query', ledgerEntries: { __typename?: 'AggregatedLedgerEntriesConnection', edges: Array<{ __typename?: 'AggregatedLedgerEntriesEdge', cursor: string, node: { __typename?: 'AggregatedLedgerEntry', vegaTime: any, quantity: string, assetId?: string | null, transferType?: Types.TransferType | null, toAccountType?: Types.AccountType | null, toAccountMarketId?: string | null, toAccountPartyId?: string | null, toAccountBalance: string, fromAccountType?: Types.AccountType | null, fromAccountMarketId?: string | null, fromAccountPartyId?: string | null, fromAccountBalance: string } } | null>, pageInfo: { __typename?: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } } };
|
||||
export type LedgerEntriesQuery = { __typename: 'Query', ledgerEntries: { __typename: 'AggregatedLedgerEntriesConnection', edges: Array<{ __typename: 'AggregatedLedgerEntriesEdge', cursor: string, node: { __typename: 'AggregatedLedgerEntry', vegaTime: any, quantity: string, assetId?: string | null, transferType?: Types.TransferType | null, toAccountType?: Types.AccountType | null, toAccountMarketId?: string | null, toAccountPartyId?: string | null, toAccountBalance: string, fromAccountType?: Types.AccountType | null, fromAccountMarketId?: string | null, fromAccountPartyId?: string | null, fromAccountBalance: string } } | null>, pageInfo: { __typename: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } } };
|
||||
|
||||
export const LedgerEntryFragmentDoc = gql`
|
||||
fragment LedgerEntry on AggregatedLedgerEntry {
|
||||
|
||||
+5
-5
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type LiquidityProvisionFieldsFragment = { __typename?: 'LiquidityProvision', id?: string | null, createdAt: any, updatedAt?: any | 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 LiquidityProvisionFieldsFragment = { __typename: 'LiquidityProvision', id?: string | null, createdAt: any, updatedAt?: any | 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', id?: string | null, createdAt: any, updatedAt?: any | 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 LiquidityProvisionsQuery = { __typename: 'Query', market?: { __typename: 'Market', liquidityProvisionsConnection?: { __typename: 'LiquidityProvisionsConnection', edges?: Array<{ __typename: 'LiquidityProvisionsEdge', node: { __typename: 'LiquidityProvision', id?: string | null, createdAt: any, updatedAt?: any | 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']>;
|
||||
@@ -18,16 +18,16 @@ export type LiquidityProvisionsUpdateSubscriptionVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type LiquidityProvisionsUpdateSubscription = { __typename?: 'Subscription', liquidityProvisions?: Array<{ __typename?: 'LiquidityProvisionUpdate', id?: string | null, partyID: string, createdAt: any, updatedAt?: any | null, marketID: string, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus }> | null };
|
||||
export type LiquidityProvisionsUpdateSubscription = { __typename: 'Subscription', liquidityProvisions?: Array<{ __typename: 'LiquidityProvisionUpdate', id?: string | null, partyID: string, createdAt: any, updatedAt?: any | null, marketID: string, commitmentAmount: string, fee: string, status: Types.LiquidityProvisionStatus }> | null };
|
||||
|
||||
export type LiquidityProviderFeeShareFieldsFragment = { __typename?: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename?: 'Party', id: string } };
|
||||
export type LiquidityProviderFeeShareFieldsFragment = { __typename: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename: 'Party', id: string } };
|
||||
|
||||
export type LiquidityProviderFeeShareQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type LiquidityProviderFeeShareQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, data?: { __typename?: 'MarketData', market: { __typename?: 'Market', id: string }, liquidityProviderFeeShare?: Array<{ __typename?: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename?: 'Party', id: string } }> | null } | null } | null };
|
||||
export type LiquidityProviderFeeShareQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, data?: { __typename: 'MarketData', market: { __typename: 'Market', id: string }, liquidityProviderFeeShare?: Array<{ __typename: 'LiquidityProviderFeeShare', equityLikeShare: string, averageEntryValuation: string, party: { __typename: 'Party', id: string } }> | null } | null } | null };
|
||||
|
||||
export const LiquidityProvisionFieldsFragmentDoc = gql`
|
||||
fragment LiquidityProvisionFields on LiquidityProvision {
|
||||
|
||||
+2
-2
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type MarketNodeFragment = { __typename?: 'Market', id: string, liquidityProvisionsConnection?: { __typename?: 'LiquidityProvisionsConnection', edges?: Array<{ __typename?: 'LiquidityProvisionsEdge', node: { __typename?: 'LiquidityProvision', commitmentAmount: string, fee: string } } | null> | null } | null, data?: { __typename?: 'MarketData', targetStake?: string | null } | null };
|
||||
export type MarketNodeFragment = { __typename: 'Market', id: string, liquidityProvisionsConnection?: { __typename: 'LiquidityProvisionsConnection', edges?: Array<{ __typename: 'LiquidityProvisionsEdge', node: { __typename: 'LiquidityProvision', commitmentAmount: string, fee: string } } | null> | null } | null, data?: { __typename: 'MarketData', targetStake?: string | null } | null };
|
||||
|
||||
export type LiquidityProvisionMarketsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type LiquidityProvisionMarketsQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, liquidityProvisionsConnection?: { __typename?: 'LiquidityProvisionsConnection', edges?: Array<{ __typename?: 'LiquidityProvisionsEdge', node: { __typename?: 'LiquidityProvision', commitmentAmount: string, fee: string } } | null> | null } | null, data?: { __typename?: 'MarketData', targetStake?: string | null } | null } }> } | null };
|
||||
export type LiquidityProvisionMarketsQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, liquidityProvisionsConnection?: { __typename: 'LiquidityProvisionsConnection', edges?: Array<{ __typename: 'LiquidityProvisionsEdge', node: { __typename: 'LiquidityProvision', commitmentAmount: string, fee: string } } | null> | null } | null, data?: { __typename: 'MarketData', targetStake?: string | null } | null } }> } | null };
|
||||
|
||||
export const MarketNodeFragmentDoc = gql`
|
||||
fragment MarketNode on Market {
|
||||
|
||||
+3
-3
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type PriceLevelFieldsFragment = { __typename?: 'PriceLevel', price: string, volume: string, numberOfOrders: string };
|
||||
export type PriceLevelFieldsFragment = { __typename: 'PriceLevel', price: string, volume: string, numberOfOrders: string };
|
||||
|
||||
export type MarketDepthQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketDepthQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, depth: { __typename?: 'MarketDepth', sequenceNumber: string, sell?: Array<{ __typename?: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null, buy?: Array<{ __typename?: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null } } | null };
|
||||
export type MarketDepthQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, depth: { __typename: 'MarketDepth', sequenceNumber: string, sell?: Array<{ __typename: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null, buy?: Array<{ __typename: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null } } | null };
|
||||
|
||||
export type MarketDepthUpdateSubscriptionVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketDepthUpdateSubscription = { __typename?: 'Subscription', marketsDepthUpdate: Array<{ __typename?: 'ObservableMarketDepthUpdate', marketId: string, sequenceNumber: string, previousSequenceNumber: string, sell?: Array<{ __typename?: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null, buy?: Array<{ __typename?: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null }> };
|
||||
export type MarketDepthUpdateSubscription = { __typename: 'Subscription', marketsDepthUpdate: Array<{ __typename: 'ObservableMarketDepthUpdate', marketId: string, sequenceNumber: string, previousSequenceNumber: string, sell?: Array<{ __typename: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null, buy?: Array<{ __typename: 'PriceLevel', price: string, volume: string, numberOfOrders: string }> | null }> };
|
||||
|
||||
export const PriceLevelFieldsFragmentDoc = gql`
|
||||
fragment PriceLevelFields on PriceLevel {
|
||||
|
||||
@@ -28,8 +28,8 @@ const CumulationBar = ({
|
||||
className={classNames(
|
||||
'absolute top-0 left-0 h-full transition-all',
|
||||
type === VolumeType.bid
|
||||
? 'bg-vega-green/20 dark:bg-vega-green/50'
|
||||
: 'bg-vega-pink/20 dark:bg-vega-pink/30'
|
||||
? 'bg-market-green/20 dark:bg-market-green/50'
|
||||
: 'bg-market-red/20 dark:bg-market-red/30'
|
||||
)}
|
||||
style={{
|
||||
width: `${cumulativeValue}%`,
|
||||
@@ -93,8 +93,8 @@ export const OrderbookRow = React.memo(
|
||||
valueFormatted={addDecimalsFixedFormatNumber(price, decimalPlaces)}
|
||||
className={
|
||||
type === VolumeType.ask
|
||||
? '!text-vega-pink dark:text-vega-pink'
|
||||
: 'text-vega-green-550 dark:text-vega-green'
|
||||
? 'text-market-red dark:text-market-red'
|
||||
: 'text-market-green-600 dark:text-market-green'
|
||||
}
|
||||
/>
|
||||
<NumericCell
|
||||
|
||||
+2
-2
@@ -4,12 +4,12 @@ import { gql } from '@apollo/client';
|
||||
import { DataSourceSpecFragmentDoc } from './markets';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type OracleMarketSpecFieldsFragment = { __typename?: 'Market', id: string, state: Types.MarketState, tradingMode: Types.MarketTradingMode, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } } };
|
||||
export type OracleMarketSpecFieldsFragment = { __typename: 'Market', id: string, state: Types.MarketState, tradingMode: Types.MarketTradingMode, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', id: string, name: string, code: string, product: { __typename: 'Future', dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } } };
|
||||
|
||||
export type OracleMarketsSpecQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type OracleMarketsSpecQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, state: Types.MarketState, tradingMode: Types.MarketTradingMode, tradableInstrument: { __typename?: 'TradableInstrument', instrument: { __typename?: 'Instrument', id: string, name: string, code: string, product: { __typename?: 'Future', dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } } } }> } | null };
|
||||
export type OracleMarketsSpecQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, state: Types.MarketState, tradingMode: Types.MarketTradingMode, tradableInstrument: { __typename: 'TradableInstrument', instrument: { __typename: 'Instrument', id: string, name: string, code: string, product: { __typename: 'Future', dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } } } }> } | null };
|
||||
|
||||
export const OracleMarketSpecFieldsFragmentDoc = gql`
|
||||
fragment OracleMarketSpecFields on Market {
|
||||
|
||||
@@ -8,7 +8,7 @@ export type OracleSpecDataConnectionQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type OracleSpecDataConnectionQuery = { __typename?: 'Query', oracleSpec?: { __typename?: 'OracleSpec', dataConnection: { __typename?: 'OracleDataConnection', edges?: Array<{ __typename?: 'OracleDataEdge', node: { __typename?: 'OracleData', externalData: { __typename?: 'ExternalData', data: { __typename?: 'Data', data?: Array<{ __typename?: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
||||
export type OracleSpecDataConnectionQuery = { __typename: 'Query', oracleSpec?: { __typename: 'OracleSpec', dataConnection: { __typename: 'OracleDataConnection', edges?: Array<{ __typename: 'OracleDataEdge', node: { __typename: 'OracleData', externalData: { __typename: 'ExternalData', data: { __typename: 'Data', data?: Array<{ __typename: 'Property', name: string, value: string }> | null } } } } | null> | null } } | null };
|
||||
|
||||
|
||||
export const OracleSpecDataConnectionDocument = gql`
|
||||
|
||||
+3
-3
@@ -3,7 +3,7 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type MarketCandlesFieldsFragment = { __typename?: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any };
|
||||
export type MarketCandlesFieldsFragment = { __typename: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any };
|
||||
|
||||
export type MarketCandlesQueryVariables = Types.Exact<{
|
||||
interval: Types.Interval;
|
||||
@@ -12,7 +12,7 @@ export type MarketCandlesQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketCandlesQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', candlesConnection?: { __typename?: 'CandleDataConnection', edges?: Array<{ __typename?: 'CandleEdge', node: { __typename?: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } } | null> | null } | null } }> } | null };
|
||||
export type MarketCandlesQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', candlesConnection?: { __typename: 'CandleDataConnection', edges?: Array<{ __typename: 'CandleEdge', node: { __typename: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } } | null> | null } | null } }> } | null };
|
||||
|
||||
export type MarketCandlesUpdateSubscriptionVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
@@ -20,7 +20,7 @@ export type MarketCandlesUpdateSubscriptionVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketCandlesUpdateSubscription = { __typename?: 'Subscription', candles: { __typename?: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } };
|
||||
export type MarketCandlesUpdateSubscription = { __typename: 'Subscription', candles: { __typename: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } };
|
||||
|
||||
export const MarketCandlesFieldsFragmentDoc = gql`
|
||||
fragment MarketCandlesFields on Candle {
|
||||
|
||||
+4
-4
@@ -3,23 +3,23 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type MarketDataUpdateFieldsFragment = { __typename?: 'ObservableMarketData', marketId: string, auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null };
|
||||
export type MarketDataUpdateFieldsFragment = { __typename: 'ObservableMarketData', marketId: string, auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, priceMonitoringBounds?: Array<{ __typename: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null };
|
||||
|
||||
export type MarketDataUpdateSubscriptionVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketDataUpdateSubscription = { __typename?: 'Subscription', marketsData: Array<{ __typename?: 'ObservableMarketData', marketId: string, auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, priceMonitoringBounds?: Array<{ __typename?: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename?: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null }> };
|
||||
export type MarketDataUpdateSubscription = { __typename: 'Subscription', marketsData: Array<{ __typename: 'ObservableMarketData', marketId: string, auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, priceMonitoringBounds?: Array<{ __typename: 'PriceMonitoringBounds', minValidPrice: string, maxValidPrice: string, referencePrice: string, trigger: { __typename: 'PriceMonitoringTrigger', horizonSecs: number, probability: number, auctionExtensionSecs: number } }> | null }> };
|
||||
|
||||
export type MarketDataFieldsFragment = { __typename?: 'MarketData', auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, 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 };
|
||||
export type MarketDataFieldsFragment = { __typename: 'MarketData', auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, 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 };
|
||||
|
||||
export type MarketDataQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketDataQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', data?: { __typename?: 'MarketData', auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, 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 } }> } | null };
|
||||
export type MarketDataQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', data?: { __typename: 'MarketData', auctionEnd?: string | null, auctionStart?: string | null, bestBidPrice: string, bestBidVolume: string, bestOfferPrice: string, bestOfferVolume: string, bestStaticBidPrice: string, bestStaticBidVolume: string, bestStaticOfferPrice: string, bestStaticOfferVolume: string, indicativePrice: string, indicativeVolume: string, marketState: Types.MarketState, marketTradingMode: Types.MarketTradingMode, marketValueProxy: string, markPrice: string, midPrice: string, openInterest: string, staticMidPrice: string, suppliedStake?: string | null, targetStake?: string | null, trigger: Types.AuctionTrigger, 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 } }> } | null };
|
||||
|
||||
export const MarketDataUpdateFieldsFragmentDoc = gql`
|
||||
fragment MarketDataUpdateFields on ObservableMarketData {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export type MarketsCandlesQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketsCandlesQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, candlesConnection?: { __typename?: 'CandleDataConnection', edges?: Array<{ __typename?: 'CandleEdge', node: { __typename?: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } } | null> | null } | null } }> } | null };
|
||||
export type MarketsCandlesQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, candlesConnection?: { __typename: 'CandleDataConnection', edges?: Array<{ __typename: 'CandleEdge', node: { __typename: 'Candle', high: string, low: string, open: string, close: string, volume: string, periodStart: any } } | null> | null } | null } }> } | null };
|
||||
|
||||
|
||||
export const MarketsCandlesDocument = gql`
|
||||
|
||||
+2
-2
@@ -3,12 +3,12 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type MarketsDataFieldsFragment = { __typename?: 'MarketData', bestBidPrice: string, bestOfferPrice: string, markPrice: string, trigger: Types.AuctionTrigger, staticMidPrice: string, marketTradingMode: Types.MarketTradingMode, indicativeVolume: string, indicativePrice: string, bestStaticBidPrice: string, bestStaticOfferPrice: string, targetStake?: string | null, suppliedStake?: string | null, auctionStart?: string | null, auctionEnd?: string | null, market: { __typename?: 'Market', id: string } };
|
||||
export type MarketsDataFieldsFragment = { __typename: 'MarketData', bestBidPrice: string, bestOfferPrice: string, markPrice: string, trigger: Types.AuctionTrigger, staticMidPrice: string, marketTradingMode: Types.MarketTradingMode, indicativeVolume: string, indicativePrice: string, bestStaticBidPrice: string, bestStaticOfferPrice: string, targetStake?: string | null, suppliedStake?: string | null, auctionStart?: string | null, auctionEnd?: string | null, market: { __typename: 'Market', id: string } };
|
||||
|
||||
export type MarketsDataQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MarketsDataQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', data?: { __typename?: 'MarketData', bestBidPrice: string, bestOfferPrice: string, markPrice: string, trigger: Types.AuctionTrigger, staticMidPrice: string, marketTradingMode: Types.MarketTradingMode, indicativeVolume: string, indicativePrice: string, bestStaticBidPrice: string, bestStaticOfferPrice: string, targetStake?: string | null, suppliedStake?: string | null, auctionStart?: string | null, auctionEnd?: string | null, market: { __typename?: 'Market', id: string } } | null } }> } | null };
|
||||
export type MarketsDataQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', data?: { __typename: 'MarketData', bestBidPrice: string, bestOfferPrice: string, markPrice: string, trigger: Types.AuctionTrigger, staticMidPrice: string, marketTradingMode: Types.MarketTradingMode, indicativeVolume: string, indicativePrice: string, bestStaticBidPrice: string, bestStaticOfferPrice: string, targetStake?: string | null, suppliedStake?: string | null, auctionStart?: string | null, auctionEnd?: string | null, market: { __typename: 'Market', id: string } } | null } }> } | null };
|
||||
|
||||
export const MarketsDataFieldsFragmentDoc = gql`
|
||||
fragment MarketsDataFields on MarketData {
|
||||
|
||||
+4
-4
@@ -3,16 +3,16 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type DataSourceFilterFragment = { __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } };
|
||||
export type DataSourceFilterFragment = { __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } };
|
||||
|
||||
export type DataSourceSpecFragment = { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } };
|
||||
export type DataSourceSpecFragment = { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } };
|
||||
|
||||
export type MarketFieldsFragment = { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, 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, quantum: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } }, marketTimestamps: { __typename?: 'MarketTimestamps', open: any, close: any } };
|
||||
export type MarketFieldsFragment = { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, fees: { __typename: 'Fees', factors: { __typename: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, 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, quantum: string }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } }, marketTimestamps: { __typename: 'MarketTimestamps', open: any, close: any } };
|
||||
|
||||
export type MarketsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MarketsQuery = { __typename?: 'Query', marketsConnection?: { __typename?: 'MarketConnection', edges: Array<{ __typename?: 'MarketEdge', node: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, fees: { __typename?: 'Fees', factors: { __typename?: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, 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, quantum: string }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename?: 'Filter', key: { __typename?: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } }, marketTimestamps: { __typename?: 'MarketTimestamps', open: any, close: any } } }> } | null };
|
||||
export type MarketsQuery = { __typename: 'Query', marketsConnection?: { __typename: 'MarketConnection', edges: Array<{ __typename: 'MarketEdge', node: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, fees: { __typename: 'Fees', factors: { __typename: 'FeeFactors', makerFee: string, infrastructureFee: string, liquidityFee: string } }, 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, quantum: string }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null, filters?: Array<{ __typename: 'Filter', key: { __typename: 'PropertyKey', name?: string | null, type: Types.PropertyKeyType, numberDecimalPlaces?: number | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename: 'DataSourceSpecToFutureBinding', settlementDataProperty: string, tradingTerminationProperty: string } } } }, marketTimestamps: { __typename: 'MarketTimestamps', open: any, close: any } } }> } | null };
|
||||
|
||||
export const DataSourceFilterFragmentDoc = gql`
|
||||
fragment DataSourceFilter on Filter {
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type DataSourceFragment = { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } };
|
||||
export type DataSourceFragment = { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } };
|
||||
|
||||
export type MarketInfoQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type MarketInfoQuery = { __typename?: 'Query', market?: { __typename?: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, lpPriceRange: string, proposal?: { __typename?: 'Proposal', id?: string | null, rationale: { __typename?: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename?: 'MarketTimestamps', open: any, close: any }, openingAuction: { __typename?: 'AuctionDuration', durationSecs: number, volume: number }, accountsConnection?: { __typename?: 'AccountsConnection', edges?: Array<{ __typename?: 'AccountEdge', node: { __typename?: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename?: 'Asset', id: string } } } | null> | null } | 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, liquidityMonitoringParameters: { __typename?: 'LiquidityMonitoringParameters', triggeringRatio: string, targetStakeParameters: { __typename?: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, 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 }, dataSourceSpecForSettlementData: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename?: 'DataSourceSpec', id: string, data: { __typename?: 'DataSourceDefinition', sourceType: { __typename?: 'DataSourceDefinitionExternal', sourceType: { __typename?: 'DataSourceSpecConfiguration', signers?: Array<{ __typename?: 'Signer', signer: { __typename?: 'ETHAddress', address?: string | null } | { __typename?: 'PubKey', key?: string | null } }> | null } } | { __typename?: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename?: 'DataSourceSpecToFutureBinding', 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 } }, marginCalculator?: { __typename?: 'MarginCalculator', scalingFactors: { __typename?: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null } } | null };
|
||||
export type MarketInfoQuery = { __typename: 'Query', market?: { __typename: 'Market', id: string, decimalPlaces: number, positionDecimalPlaces: number, state: Types.MarketState, tradingMode: Types.MarketTradingMode, lpPriceRange: string, proposal?: { __typename: 'Proposal', id?: string | null, rationale: { __typename: 'ProposalRationale', title: string, description: string } } | null, marketTimestamps: { __typename: 'MarketTimestamps', open: any, close: any }, openingAuction: { __typename: 'AuctionDuration', durationSecs: number, volume: number }, accountsConnection?: { __typename: 'AccountsConnection', edges?: Array<{ __typename: 'AccountEdge', node: { __typename: 'AccountBalance', type: Types.AccountType, balance: string, asset: { __typename: 'Asset', id: string } } } | null> | null } | 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, liquidityMonitoringParameters: { __typename: 'LiquidityMonitoringParameters', triggeringRatio: string, targetStakeParameters: { __typename: 'TargetStakeParameters', timeWindow: number, scalingFactor: number } }, 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 }, dataSourceSpecForSettlementData: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecForTradingTermination: { __typename: 'DataSourceSpec', id: string, data: { __typename: 'DataSourceDefinition', sourceType: { __typename: 'DataSourceDefinitionExternal', sourceType: { __typename: 'DataSourceSpecConfiguration', signers?: Array<{ __typename: 'Signer', signer: { __typename: 'ETHAddress', address?: string | null } | { __typename: 'PubKey', key?: string | null } }> | null } } | { __typename: 'DataSourceDefinitionInternal' } } }, dataSourceSpecBinding: { __typename: 'DataSourceSpecToFutureBinding', 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 } }, marginCalculator?: { __typename: 'MarginCalculator', scalingFactors: { __typename: 'ScalingFactors', searchLevel: number, initialMargin: number, collateralRelease: number } } | null } } | null };
|
||||
|
||||
export const DataSourceFragmentDoc = gql`
|
||||
fragment DataSource on DataSourceDefinition {
|
||||
|
||||
+2
-2
@@ -6,14 +6,14 @@ const defaultOptions = {} as const;
|
||||
export type NetworkParamsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type NetworkParamsQuery = { __typename?: 'Query', networkParametersConnection: { __typename?: 'NetworkParametersConnection', edges?: Array<{ __typename?: 'NetworkParameterEdge', node: { __typename?: 'NetworkParameter', key: string, value: string } } | null> | null } };
|
||||
export type NetworkParamsQuery = { __typename: 'Query', networkParametersConnection: { __typename: 'NetworkParametersConnection', edges?: Array<{ __typename: 'NetworkParameterEdge', node: { __typename: 'NetworkParameter', key: string, value: string } } | null> | null } };
|
||||
|
||||
export type NetworkParamQueryVariables = Types.Exact<{
|
||||
key: Types.Scalars['String'];
|
||||
}>;
|
||||
|
||||
|
||||
export type NetworkParamQuery = { __typename?: 'Query', networkParameter?: { __typename?: 'NetworkParameter', key: string, value: string } | null };
|
||||
export type NetworkParamQuery = { __typename: 'Query', networkParameter?: { __typename: 'NetworkParameter', key: string, value: string } | null };
|
||||
|
||||
|
||||
export const NetworkParamsDocument = gql`
|
||||
|
||||
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type StatsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type StatsQuery = { __typename?: 'Query', epoch: { __typename?: 'Epoch', id: string }, nodeData?: { __typename?: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number } | null, statistics: { __typename?: 'Statistics', status: string, blockHeight: string, blockDuration: string, backlogLength: string, txPerBlock: string, tradesPerSecond: string, ordersPerSecond: string, averageOrdersPerBlock: string, vegaTime: any, appVersion: string, chainVersion: string, chainId: string, genesisTime: any } };
|
||||
export type StatsQuery = { __typename: 'Query', epoch: { __typename: 'Epoch', id: string }, nodeData?: { __typename: 'NodeData', stakedTotal: string, totalNodes: number, inactiveNodes: number } | null, statistics: { __typename: 'Statistics', status: string, blockHeight: string, blockDuration: string, backlogLength: string, txPerBlock: string, tradesPerSecond: string, ordersPerSecond: string, averageOrdersPerBlock: string, vegaTime: any, appVersion: string, chainVersion: string, chainId: string, genesisTime: any } };
|
||||
|
||||
|
||||
export const StatsDocument = gql`
|
||||
|
||||
+5
-5
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type OrderFieldsFragment = { __typename?: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename?: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null };
|
||||
export type OrderFieldsFragment = { __typename: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null };
|
||||
|
||||
export type OrderByIdQueryVariables = Types.Exact<{
|
||||
orderId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type OrderByIdQuery = { __typename?: 'Query', orderByID: { __typename?: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename?: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null } };
|
||||
export type OrderByIdQuery = { __typename: 'Query', orderByID: { __typename: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null } };
|
||||
|
||||
export type OrdersQueryVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -20,9 +20,9 @@ export type OrdersQueryVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type OrdersQuery = { __typename?: 'Query', party?: { __typename?: 'Party', id: string, ordersConnection?: { __typename?: 'OrderConnection', edges?: Array<{ __typename?: 'OrderEdge', cursor?: string | null, node: { __typename?: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename?: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null } }> | null, pageInfo?: { __typename?: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } | null } | null } | null };
|
||||
export type OrdersQuery = { __typename: 'Query', party?: { __typename: 'Party', id: string, ordersConnection?: { __typename: 'OrderConnection', edges?: Array<{ __typename: 'OrderEdge', cursor?: string | null, node: { __typename: 'Order', id: string, type?: Types.OrderType | null, side: Types.Side, size: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, remaining: string, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, postOnly?: boolean | null, reduceOnly?: boolean | null, market: { __typename: 'Market', id: string }, liquidityProvision?: { __typename: 'LiquidityProvision' } | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null } }> | null, pageInfo?: { __typename: 'PageInfo', startCursor: string, endCursor: string, hasNextPage: boolean, hasPreviousPage: boolean } | null } | null } | null };
|
||||
|
||||
export type OrderUpdateFieldsFragment = { __typename?: 'OrderUpdate', id: string, marketId: string, type?: Types.OrderType | null, side: Types.Side, size: string, remaining: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, liquidityProvisionId?: string | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null };
|
||||
export type OrderUpdateFieldsFragment = { __typename: 'OrderUpdate', id: string, marketId: string, type?: Types.OrderType | null, side: Types.Side, size: string, remaining: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, liquidityProvisionId?: string | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null };
|
||||
|
||||
export type OrdersUpdateSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
@@ -30,7 +30,7 @@ export type OrdersUpdateSubscriptionVariables = Types.Exact<{
|
||||
}>;
|
||||
|
||||
|
||||
export type OrdersUpdateSubscription = { __typename?: 'Subscription', orders?: Array<{ __typename?: 'OrderUpdate', id: string, marketId: string, type?: Types.OrderType | null, side: Types.Side, size: string, remaining: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, liquidityProvisionId?: string | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null }> | null };
|
||||
export type OrdersUpdateSubscription = { __typename: 'Subscription', orders?: Array<{ __typename: 'OrderUpdate', id: string, marketId: string, type?: Types.OrderType | null, side: Types.Side, size: string, remaining: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, createdAt: any, updatedAt?: any | null, liquidityProvisionId?: string | null, peggedOrder?: { __typename: 'PeggedOrder', reference: Types.PeggedReference, offset: string } | null }> | null };
|
||||
|
||||
export const OrderFieldsFragmentDoc = gql`
|
||||
fragment OrderFields on Order {
|
||||
|
||||
@@ -76,54 +76,4 @@ describe('order data provider', () => {
|
||||
)?.length
|
||||
).toEqual(5);
|
||||
});
|
||||
it('add only data matching date range filter', () => {
|
||||
const data = [
|
||||
{
|
||||
id: '1',
|
||||
createdAt: new Date('2022-01-29').toISOString(),
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
createdAt: new Date('2022-01-30').toISOString(),
|
||||
},
|
||||
] as OrderFieldsFragment[];
|
||||
|
||||
const delta = [
|
||||
// this one should be ignored because it does not match date range
|
||||
{
|
||||
id: '0',
|
||||
createdAt: new Date('2022-02-02').toISOString(),
|
||||
},
|
||||
// this one should be updated
|
||||
{
|
||||
id: '2',
|
||||
updatedAt: new Date('2022-01-31').toISOString(),
|
||||
createdAt: new Date('2022-01-30').toISOString(),
|
||||
},
|
||||
// this should be added
|
||||
{
|
||||
id: '4',
|
||||
createdAt: new Date('2022-01-31').toISOString(),
|
||||
},
|
||||
] as OrderUpdateFieldsFragment[];
|
||||
|
||||
const updatedData = update(
|
||||
data,
|
||||
filterOrderUpdates(delta),
|
||||
{
|
||||
partyId: '0x123',
|
||||
filter: {
|
||||
dateRange: { end: new Date('2022-02-01').toISOString() },
|
||||
},
|
||||
},
|
||||
mapOrderUpdateToOrder
|
||||
);
|
||||
expect(updatedData?.findIndex((node) => node.id === delta[0].id)).toEqual(
|
||||
-1
|
||||
);
|
||||
expect(updatedData && updatedData[0].id).toEqual(delta[2].id);
|
||||
expect(updatedData && updatedData[0].updatedAt).toEqual(delta[2].updatedAt);
|
||||
expect(updatedData && updatedData[2].id).toEqual(delta[1].id);
|
||||
expect(updatedData && updatedData[2].updatedAt).toEqual(delta[1].updatedAt);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -39,13 +39,6 @@ const orderMatchFilters = (
|
||||
return true;
|
||||
}
|
||||
|
||||
if (
|
||||
variables?.filter?.status &&
|
||||
!(order.status && variables.filter.status.includes(order.status))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
variables?.filter?.liveOnly &&
|
||||
!(order.status && liveOnlyOrderStatuses.includes(order.status))
|
||||
@@ -53,34 +46,6 @@ const orderMatchFilters = (
|
||||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
variables?.filter?.types &&
|
||||
!(order.type && variables.filter.types.includes(order.type))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
variables?.filter?.timeInForce &&
|
||||
!variables.filter.timeInForce.includes(order.timeInForce)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (variables?.filter?.excludeLiquidity && order.liquidityProvisionId) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
variables?.filter?.dateRange?.start &&
|
||||
!(order.createdAt && variables.filter.dateRange.start < order.createdAt)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
variables?.filter?.dateRange?.end &&
|
||||
!(order.createdAt && variables.filter.dateRange.end > order.createdAt)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
@@ -50,13 +50,12 @@ describe('OrderListTable', () => {
|
||||
});
|
||||
const expectedHeaders = [
|
||||
'Market',
|
||||
'Filled',
|
||||
'Size',
|
||||
'Type',
|
||||
'Status',
|
||||
'Filled',
|
||||
'Price',
|
||||
'Time In Force',
|
||||
'Created At',
|
||||
'Updated At',
|
||||
'', // no cell header for edit/cancel
|
||||
];
|
||||
@@ -73,14 +72,13 @@ describe('OrderListTable', () => {
|
||||
const cells = screen.getAllByRole('gridcell');
|
||||
const expectedValues: string[] = [
|
||||
marketOrder.market?.tradableInstrument.instrument.code || '',
|
||||
'+0.10',
|
||||
'0.05',
|
||||
'0.10',
|
||||
Schema.OrderTypeMapping[marketOrder.type as Schema.OrderType] || '',
|
||||
Schema.OrderStatusMapping[marketOrder.status],
|
||||
'5',
|
||||
'-',
|
||||
Schema.OrderTimeInForceMapping[marketOrder.timeInForce],
|
||||
Schema.OrderTimeInForceCode[marketOrder.timeInForce],
|
||||
getDateTimeFormat().format(new Date(marketOrder.createdAt)),
|
||||
'-',
|
||||
'Edit',
|
||||
];
|
||||
expectedValues.forEach((expectedValue, i) =>
|
||||
@@ -96,16 +94,15 @@ describe('OrderListTable', () => {
|
||||
|
||||
const expectedValues: string[] = [
|
||||
limitOrder.market?.tradableInstrument.instrument.code || '',
|
||||
'+0.10',
|
||||
'0.05',
|
||||
'0.10',
|
||||
Schema.OrderTypeMapping[limitOrder.type || Schema.OrderType.TYPE_LIMIT],
|
||||
Schema.OrderStatusMapping[limitOrder.status],
|
||||
'5',
|
||||
'-',
|
||||
`${
|
||||
Schema.OrderTimeInForceMapping[limitOrder.timeInForce]
|
||||
Schema.OrderTimeInForceCode[limitOrder.timeInForce]
|
||||
}: ${getDateTimeFormat().format(new Date(limitOrder.expiresAt ?? ''))}`,
|
||||
getDateTimeFormat().format(new Date(limitOrder.createdAt)),
|
||||
'-',
|
||||
'Edit',
|
||||
];
|
||||
expectedValues.forEach((expectedValue, i) =>
|
||||
@@ -124,7 +121,7 @@ describe('OrderListTable', () => {
|
||||
render(generateJsx({ rowData: [rejectedOrder] }));
|
||||
});
|
||||
const cells = screen.getAllByRole('gridcell');
|
||||
expect(cells[3]).toHaveTextContent(
|
||||
expect(cells[4]).toHaveTextContent(
|
||||
`${Schema.OrderStatusMapping[rejectedOrder.status]}: ${
|
||||
Schema.OrderRejectionReasonMapping[rejectedOrder.rejectionReason]
|
||||
}`
|
||||
@@ -193,7 +190,7 @@ describe('OrderListTable', () => {
|
||||
});
|
||||
|
||||
const amendCell = getAmendCell();
|
||||
const typeCell = screen.getAllByRole('gridcell')[2];
|
||||
const typeCell = screen.getAllByRole('gridcell')[3];
|
||||
expect(typeCell).toHaveTextContent('Liquidity provision');
|
||||
expect(amendCell.queryByTestId('edit')).not.toBeInTheDocument();
|
||||
expect(amendCell.queryByTestId('cancel')).not.toBeInTheDocument();
|
||||
@@ -215,7 +212,7 @@ describe('OrderListTable', () => {
|
||||
});
|
||||
|
||||
const amendCell = getAmendCell();
|
||||
const typeCell = screen.getAllByRole('gridcell')[2];
|
||||
const typeCell = screen.getAllByRole('gridcell')[3];
|
||||
expect(typeCell).toHaveTextContent('Mid - 10.0 Peg limit');
|
||||
expect(amendCell.queryByTestId('edit')).toBeInTheDocument();
|
||||
expect(amendCell.queryByTestId('cancel')).toBeInTheDocument();
|
||||
|
||||
@@ -63,6 +63,38 @@ export const OrderListTable = memo<
|
||||
cellRendererParams: { idPath: 'market.id', onMarketClick },
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
headerName: t('Filled'),
|
||||
field: 'remaining',
|
||||
cellClass: 'font-mono text-right',
|
||||
type: 'rightAligned',
|
||||
valueGetter: ({ data }: VegaValueGetterParams<Order>) => {
|
||||
return data?.size && data.market
|
||||
? toBigNum(
|
||||
(BigInt(data.size) - BigInt(data.remaining)).toString(),
|
||||
data.market.positionDecimalPlaces ?? 0
|
||||
).toNumber()
|
||||
: undefined;
|
||||
},
|
||||
valueFormatter: ({
|
||||
data,
|
||||
value,
|
||||
}: VegaValueFormatterParams<Order, 'remaining'>): string => {
|
||||
if (!data) {
|
||||
return '';
|
||||
}
|
||||
if (!data?.market || !isNumeric(value) || !isNumeric(data.size)) {
|
||||
return '-';
|
||||
}
|
||||
return addDecimalsFormatNumber(
|
||||
(BigInt(data.size) - BigInt(data.remaining)).toString(),
|
||||
data.market.positionDecimalPlaces
|
||||
);
|
||||
},
|
||||
minWidth: 50,
|
||||
width: 90,
|
||||
flex: 0,
|
||||
},
|
||||
{
|
||||
headerName: t('Size'),
|
||||
field: 'size',
|
||||
@@ -103,7 +135,9 @@ export const OrderListTable = memo<
|
||||
)
|
||||
);
|
||||
},
|
||||
minWidth: 80,
|
||||
minWidth: 50,
|
||||
width: 80,
|
||||
flex: 0,
|
||||
},
|
||||
{
|
||||
field: 'type',
|
||||
@@ -150,38 +184,6 @@ export const OrderListTable = memo<
|
||||
),
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
headerName: t('Filled'),
|
||||
field: 'remaining',
|
||||
cellClass: 'font-mono text-right',
|
||||
type: 'rightAligned',
|
||||
valueGetter: ({ data }: VegaValueGetterParams<Order>) => {
|
||||
return data?.size && data.market
|
||||
? toBigNum(
|
||||
(BigInt(data.size) - BigInt(data.remaining)).toString(),
|
||||
data.market.positionDecimalPlaces ?? 0
|
||||
).toNumber()
|
||||
: undefined;
|
||||
},
|
||||
valueFormatter: ({
|
||||
data,
|
||||
value,
|
||||
}: VegaValueFormatterParams<Order, 'remaining'>): string => {
|
||||
if (!data) {
|
||||
return '';
|
||||
}
|
||||
if (!data?.market || !isNumeric(value) || !isNumeric(data.size)) {
|
||||
return '-';
|
||||
}
|
||||
const { positionDecimalPlaces } = data.market;
|
||||
const filled = BigInt(data.size) - BigInt(data.remaining);
|
||||
return `${addDecimalsFormatNumber(
|
||||
filled.toString(),
|
||||
positionDecimalPlaces
|
||||
)}/${addDecimalsFormatNumber(data.size, positionDecimalPlaces)}`;
|
||||
},
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
field: 'price',
|
||||
type: 'rightAligned',
|
||||
@@ -221,12 +223,10 @@ export const OrderListTable = memo<
|
||||
const expiry = getDateTimeFormat().format(
|
||||
new Date(data.expiresAt)
|
||||
);
|
||||
return `${Schema.OrderTimeInForceMapping[value]}: ${expiry}`;
|
||||
return `${Schema.OrderTimeInForceCode[value]}: ${expiry}`;
|
||||
}
|
||||
|
||||
const tifLabel = value
|
||||
? Schema.OrderTimeInForceMapping[value]
|
||||
: '';
|
||||
const tifLabel = value ? Schema.OrderTimeInForceCode[value] : '';
|
||||
const label = `${tifLabel}${
|
||||
data?.postOnly ? t('. Post Only') : ''
|
||||
}${data?.reduceOnly ? t('. Reduce only') : ''}`;
|
||||
@@ -235,29 +235,18 @@ export const OrderListTable = memo<
|
||||
},
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
field: 'createdAt',
|
||||
filter: DateRangeFilter,
|
||||
cellRenderer: ({
|
||||
value,
|
||||
}: VegaICellRendererParams<Order, 'createdAt'>) => {
|
||||
return (
|
||||
<span data-value={value}>
|
||||
{value ? getDateTimeFormat().format(new Date(value)) : value}
|
||||
</span>
|
||||
);
|
||||
},
|
||||
minWidth: 150,
|
||||
},
|
||||
{
|
||||
field: 'updatedAt',
|
||||
filter: DateRangeFilter,
|
||||
valueGetter: ({ data }: VegaValueGetterParams<Order>) =>
|
||||
data?.updatedAt || data?.createdAt,
|
||||
cellRenderer: ({
|
||||
data,
|
||||
value,
|
||||
}: VegaICellRendererParams<Order, 'updatedAt'>) => {
|
||||
if (!data) {
|
||||
return undefined;
|
||||
}
|
||||
const value = data.updatedAt || data.createdAt;
|
||||
return (
|
||||
<span data-value={value}>
|
||||
{value ? getDateTimeFormat().format(new Date(value)) : '-'}
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type OrderSubFieldsFragment = { __typename?: 'OrderUpdate', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: any, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, side: Types.Side, marketId: string };
|
||||
export type OrderSubFieldsFragment = { __typename: 'OrderUpdate', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: any, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, side: Types.Side, marketId: string };
|
||||
|
||||
export type OrderSubSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type OrderSubSubscription = { __typename?: 'Subscription', orders?: Array<{ __typename?: 'OrderUpdate', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: any, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, side: Types.Side, marketId: string }> | null };
|
||||
export type OrderSubSubscription = { __typename: 'Subscription', orders?: Array<{ __typename: 'OrderUpdate', type?: Types.OrderType | null, id: string, status: Types.OrderStatus, rejectionReason?: Types.OrderRejectionReason | null, createdAt: any, size: string, price: string, timeInForce: Types.OrderTimeInForce, expiresAt?: any | null, side: Types.Side, marketId: string }> | null };
|
||||
|
||||
export const OrderSubFieldsFragmentDoc = gql`
|
||||
fragment OrderSubFields on OrderUpdate {
|
||||
|
||||
+4
-4
@@ -3,21 +3,21 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type PositionFieldsFragment = { __typename?: 'Position', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, positionStatus: Types.PositionStatus, lossSocializationAmount: string, market: { __typename?: 'Market', id: string }, party: { __typename?: 'Party', id: string } };
|
||||
export type PositionFieldsFragment = { __typename: 'Position', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, positionStatus: Types.PositionStatus, lossSocializationAmount: string, market: { __typename: 'Market', id: string }, party: { __typename: 'Party', id: string } };
|
||||
|
||||
export type PositionsQueryVariables = Types.Exact<{
|
||||
partyIds: Array<Types.Scalars['ID']> | Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type PositionsQuery = { __typename?: 'Query', positions?: { __typename?: 'PositionConnection', edges?: Array<{ __typename?: 'PositionEdge', node: { __typename?: 'Position', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, positionStatus: Types.PositionStatus, lossSocializationAmount: string, market: { __typename?: 'Market', id: string }, party: { __typename?: 'Party', id: string } } }> | null } | null };
|
||||
export type PositionsQuery = { __typename: 'Query', positions?: { __typename: 'PositionConnection', edges?: Array<{ __typename: 'PositionEdge', node: { __typename: 'Position', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, positionStatus: Types.PositionStatus, lossSocializationAmount: string, market: { __typename: 'Market', id: string }, party: { __typename: 'Party', id: string } } }> | null } | null };
|
||||
|
||||
export type PositionsSubscriptionSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type PositionsSubscriptionSubscription = { __typename?: 'Subscription', positions: Array<{ __typename?: 'PositionUpdate', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, marketId: string, lossSocializationAmount: string, positionStatus: Types.PositionStatus, partyId: string }> };
|
||||
export type PositionsSubscriptionSubscription = { __typename: 'Subscription', positions: Array<{ __typename: 'PositionUpdate', realisedPNL: string, openVolume: string, unrealisedPNL: string, averageEntryPrice: string, updatedAt?: any | null, marketId: string, lossSocializationAmount: string, positionStatus: Types.PositionStatus, partyId: string }> };
|
||||
|
||||
export type EstimatePositionQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
@@ -27,7 +27,7 @@ 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 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 {
|
||||
|
||||
@@ -102,8 +102,8 @@ it('add color and sign to amount, displays positive notional value', async () =>
|
||||
});
|
||||
let cells = screen.getAllByRole('gridcell');
|
||||
|
||||
expect(cells[2].classList.contains('text-vega-green-550')).toBeTruthy();
|
||||
expect(cells[2].classList.contains('text-vega-pink')).toBeFalsy();
|
||||
expect(cells[2].classList.contains('text-market-green-600')).toBeTruthy();
|
||||
expect(cells[2].classList.contains('text-market-red')).toBeFalsy();
|
||||
expect(cells[2].textContent).toEqual('+100');
|
||||
expect(cells[1].textContent).toEqual('1,230.0');
|
||||
await act(async () => {
|
||||
@@ -115,8 +115,8 @@ it('add color and sign to amount, displays positive notional value', async () =>
|
||||
);
|
||||
});
|
||||
cells = screen.getAllByRole('gridcell');
|
||||
expect(cells[2].classList.contains('text-vega-green-550')).toBeFalsy();
|
||||
expect(cells[2].classList.contains('text-vega-pink')).toBeTruthy();
|
||||
expect(cells[2].classList.contains('text-market-green-600')).toBeFalsy();
|
||||
expect(cells[2].classList.contains('text-market-red')).toBeTruthy();
|
||||
expect(cells[2].textContent?.startsWith('-100')).toBeTruthy();
|
||||
expect(cells[1].textContent).toEqual('1,230.0');
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,28 +4,28 @@ import { gql } from '@apollo/client';
|
||||
import { UpdateNetworkParameterFielsFragmentDoc } from '../../proposals-data-provider/__generated__/Proposals';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ProposalEventFieldsFragment = { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null };
|
||||
export type ProposalEventFieldsFragment = { __typename: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null };
|
||||
|
||||
export type ProposalEventSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ProposalEventSubscription = { __typename?: 'Subscription', proposals: { __typename?: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } };
|
||||
export type ProposalEventSubscription = { __typename: 'Subscription', proposals: { __typename: 'Proposal', id?: string | null, reference: string, state: Types.ProposalState, rejectionReason?: Types.ProposalRejectionReason | null, errorDetails?: string | null } };
|
||||
|
||||
export type UpdateNetworkParameterProposalFragment = { __typename?: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename?: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename?: 'NewAsset' } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket' } | { __typename?: 'UpdateAsset' } | { __typename?: 'UpdateMarket' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } } };
|
||||
export type UpdateNetworkParameterProposalFragment = { __typename: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename: 'NewAsset' } | { __typename: 'NewFreeform' } | { __typename: 'NewMarket' } | { __typename: 'UpdateAsset' } | { __typename: 'UpdateMarket' } | { __typename: 'UpdateNetworkParameter', networkParameter: { __typename: 'NetworkParameter', key: string, value: string } } } };
|
||||
|
||||
export type OnUpdateNetworkParametersSubscriptionVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type OnUpdateNetworkParametersSubscription = { __typename?: 'Subscription', proposals: { __typename?: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename?: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename?: 'NewAsset' } | { __typename?: 'NewFreeform' } | { __typename?: 'NewMarket' } | { __typename?: 'UpdateAsset' } | { __typename?: 'UpdateMarket' } | { __typename?: 'UpdateNetworkParameter', networkParameter: { __typename?: 'NetworkParameter', key: string, value: string } } } } };
|
||||
export type OnUpdateNetworkParametersSubscription = { __typename: 'Subscription', proposals: { __typename: 'Proposal', id?: string | null, state: Types.ProposalState, datetime: any, terms: { __typename: 'ProposalTerms', enactmentDatetime?: any | null, change: { __typename: 'NewAsset' } | { __typename: 'NewFreeform' } | { __typename: 'NewMarket' } | { __typename: 'UpdateAsset' } | { __typename: 'UpdateMarket' } | { __typename: 'UpdateNetworkParameter', networkParameter: { __typename: 'NetworkParameter', key: string, value: string } } } } };
|
||||
|
||||
export type ProposalOfMarketQueryVariables = Types.Exact<{
|
||||
marketId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type ProposalOfMarketQuery = { __typename?: 'Query', proposal?: { __typename?: 'Proposal', id?: string | null, terms: { __typename?: 'ProposalTerms', enactmentDatetime?: any | null } } | null };
|
||||
export type ProposalOfMarketQuery = { __typename: 'Query', proposal?: { __typename: 'Proposal', id?: string | null, terms: { __typename: 'ProposalTerms', enactmentDatetime?: any | null } } | null };
|
||||
|
||||
export const ProposalEventFieldsFragmentDoc = gql`
|
||||
fragment ProposalEventFields on Proposal {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ const defaultOptions = {} as const;
|
||||
export type BlockStatisticsQueryVariables = Types.Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type BlockStatisticsQuery = { __typename?: 'Query', statistics: { __typename?: 'Statistics', blockHeight: string, blockDuration: string } };
|
||||
export type BlockStatisticsQuery = { __typename: 'Query', statistics: { __typename: 'Statistics', blockHeight: string, blockDuration: string } };
|
||||
|
||||
|
||||
export const BlockStatisticsDocument = gql`
|
||||
|
||||
Generated
+2
-2
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type ProtocolUpgradeProposalFieldsFragment = { __typename?: 'ProtocolUpgradeProposal', upgradeBlockHeight: string, vegaReleaseTag: string, approvers: Array<string>, status: Types.ProtocolUpgradeProposalStatus };
|
||||
export type ProtocolUpgradeProposalFieldsFragment = { __typename: 'ProtocolUpgradeProposal', upgradeBlockHeight: string, vegaReleaseTag: string, approvers: Array<string>, status: Types.ProtocolUpgradeProposalStatus };
|
||||
|
||||
export type ProtocolUpgradeProposalsQueryVariables = Types.Exact<{
|
||||
inState?: Types.InputMaybe<Types.ProtocolUpgradeProposalStatus>;
|
||||
}>;
|
||||
|
||||
|
||||
export type ProtocolUpgradeProposalsQuery = { __typename?: 'Query', lastBlockHeight: string, protocolUpgradeProposals?: { __typename?: 'ProtocolUpgradeProposalConnection', edges?: Array<{ __typename?: 'ProtocolUpgradeProposalEdge', node: { __typename?: 'ProtocolUpgradeProposal', upgradeBlockHeight: string, vegaReleaseTag: string, approvers: Array<string>, status: Types.ProtocolUpgradeProposalStatus } }> | null } | null };
|
||||
export type ProtocolUpgradeProposalsQuery = { __typename: 'Query', lastBlockHeight: string, protocolUpgradeProposals?: { __typename: 'ProtocolUpgradeProposalConnection', edges?: Array<{ __typename: 'ProtocolUpgradeProposalEdge', node: { __typename: 'ProtocolUpgradeProposal', upgradeBlockHeight: string, vegaReleaseTag: string, approvers: Array<string>, status: Types.ProtocolUpgradeProposalStatus } }> | null } | null };
|
||||
|
||||
export const ProtocolUpgradeProposalFieldsFragmentDoc = gql`
|
||||
fragment ProtocolUpgradeProposalFields on ProtocolUpgradeProposal {
|
||||
|
||||
@@ -3,14 +3,14 @@ import * as Types from '@vegaprotocol/types';
|
||||
import { gql } from '@apollo/client';
|
||||
import * as Apollo from '@apollo/client';
|
||||
const defaultOptions = {} as const;
|
||||
export type VoteEventFieldsFragment = { __typename?: 'ProposalVote', proposalId: string, vote: { __typename?: 'Vote', value: Types.VoteValue, datetime: any } };
|
||||
export type VoteEventFieldsFragment = { __typename: 'ProposalVote', proposalId: string, vote: { __typename: 'Vote', value: Types.VoteValue, datetime: any } };
|
||||
|
||||
export type VoteEventSubscriptionVariables = Types.Exact<{
|
||||
partyId: Types.Scalars['ID'];
|
||||
}>;
|
||||
|
||||
|
||||
export type VoteEventSubscription = { __typename?: 'Subscription', votes: { __typename?: 'ProposalVote', proposalId: string, vote: { __typename?: 'Vote', value: Types.VoteValue, datetime: any } } };
|
||||
export type VoteEventSubscription = { __typename: 'Subscription', votes: { __typename: 'ProposalVote', proposalId: string, vote: { __typename: 'Vote', value: Types.VoteValue, datetime: any } } };
|
||||
|
||||
export const VoteEventFieldsFragmentDoc = gql`
|
||||
fragment VoteEventFields on ProposalVote {
|
||||
|
||||
@@ -13,6 +13,24 @@ module.exports = {
|
||||
current: 'currentColor',
|
||||
black: '#000000',
|
||||
white: '#FFFFFF',
|
||||
market: {
|
||||
red: {
|
||||
// same as vega-red
|
||||
700: '#2F000C',
|
||||
600: '#7B001F',
|
||||
550: '#B3002E',
|
||||
DEFAULT: '#EC003C',
|
||||
500: '#EC003C',
|
||||
},
|
||||
green: {
|
||||
// same as vega-green
|
||||
700: '#012915',
|
||||
600: '#01914B',
|
||||
550: '#01C566',
|
||||
DEFAULT: '#00F780',
|
||||
500: '#00F780',
|
||||
},
|
||||
},
|
||||
vega: {
|
||||
// YELLOW
|
||||
yellow: {
|
||||
@@ -32,7 +50,7 @@ module.exports = {
|
||||
green: {
|
||||
700: '#012915',
|
||||
650: '#015D30',
|
||||
600: '#01914B',
|
||||
600: '#008545',
|
||||
550: '#01C566',
|
||||
DEFAULT: '#00F780',
|
||||
500: '#00F780',
|
||||
@@ -84,6 +102,20 @@ module.exports = {
|
||||
300: '#FFD7EA',
|
||||
},
|
||||
|
||||
// RED
|
||||
red: {
|
||||
700: '#2F000C',
|
||||
650: '#550016',
|
||||
600: '#7B001F',
|
||||
550: '#B3002E',
|
||||
DEFAULT: '#EC003C',
|
||||
500: '#EC003C',
|
||||
450: '#F03D6B',
|
||||
400: '#F4668A',
|
||||
350: '#F78FA9',
|
||||
300: '#F8A3B9',
|
||||
},
|
||||
|
||||
// ORANGE
|
||||
orange: {
|
||||
700: '#2A1701',
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user