fix: update mocks (#860)

This commit is contained in:
Joe Tsang 2022-07-26 12:16:47 +01:00 committed by GitHub
parent f8bc95e3df
commit 6d4fe1cf66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import merge from 'lodash/merge';
import type { PartialDeep } from 'type-fest';
import type { MarketList, MarketList_markets } from '@vegaprotocol/market-list';
import { MarketState, MarketTradingMode } from '@vegaprotocol/types';
export const generateMarketList = (
override?: PartialDeep<MarketList>
@ -9,6 +10,8 @@ export const generateMarketList = (
{
id: 'market-0',
decimalPlaces: 5,
state: MarketState.Active,
tradingMode: MarketTradingMode.Continuous,
data: {
market: {
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
@ -40,6 +43,8 @@ export const generateMarketList = (
{
id: 'market-1',
decimalPlaces: 2,
state: MarketState.Suspended,
tradingMode: MarketTradingMode.MonitoringAuction,
data: {
market: {
id: '34d95e10faa00c21d19d382d6d7e6fc9722a96985369f0caec041b0f44b775ed',

View File

@ -1,5 +1,9 @@
import merge from 'lodash/merge';
import { MarketState, MarketTradingMode } from '@vegaprotocol/types';
import {
AuctionTrigger,
MarketState,
MarketTradingMode,
} from '@vegaprotocol/types';
import type { PartialDeep } from 'type-fest';
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
import type { Market } from '../../../../trading/pages/markets/__generated__/Market';
@ -12,6 +16,7 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
tradingMode: MarketTradingMode.Continuous,
state: MarketState.Active,
decimalPlaces: 5,
positionDecimalPlaces: 0,
data: {
market: {
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
@ -23,6 +28,7 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
bestOfferVolume: '100',
bestStaticBidVolume: '482',
bestStaticOfferVolume: '2188',
trigger: AuctionTrigger.Unspecified,
__typename: 'MarketData',
},
tradableInstrument: {
@ -40,6 +46,16 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
],
__typename: 'InstrumentMetadata',
},
product: {
quoteName: 'BTCUSD Monthly',
settlementAsset: {
id: '000',
symbol: 'USD',
name: 'United States Dollar',
__typename: 'Asset',
},
__typename: 'Future',
},
__typename: 'Instrument',
},
__typename: 'TradableInstrument',

View File

@ -1,5 +1,9 @@
import merge from 'lodash/merge';
import { MarketState, MarketTradingMode } from '@vegaprotocol/types';
import {
AuctionTrigger,
MarketState,
MarketTradingMode,
} from '@vegaprotocol/types';
import type { PartialDeep } from 'type-fest';
import type { Markets, Markets_markets } from '@vegaprotocol/market-list';
@ -19,6 +23,7 @@ export const generateMarkets = (override?: PartialDeep<Markets>): Markets => {
bestBidPrice: '0',
bestOfferPrice: '0',
markPrice: '4612690058',
trigger: AuctionTrigger.Unspecified,
__typename: 'MarketData',
},
tradableInstrument: {
@ -51,6 +56,7 @@ export const generateMarkets = (override?: PartialDeep<Markets>): Markets => {
bestBidPrice: '0',
bestOfferPrice: '0',
markPrice: '8441',
trigger: AuctionTrigger.Unspecified,
__typename: 'MarketData',
},
tradableInstrument: {