fix: update mocks (#860)
This commit is contained in:
parent
f8bc95e3df
commit
6d4fe1cf66
@ -1,6 +1,7 @@
|
|||||||
import merge from 'lodash/merge';
|
import merge from 'lodash/merge';
|
||||||
import type { PartialDeep } from 'type-fest';
|
import type { PartialDeep } from 'type-fest';
|
||||||
import type { MarketList, MarketList_markets } from '@vegaprotocol/market-list';
|
import type { MarketList, MarketList_markets } from '@vegaprotocol/market-list';
|
||||||
|
import { MarketState, MarketTradingMode } from '@vegaprotocol/types';
|
||||||
|
|
||||||
export const generateMarketList = (
|
export const generateMarketList = (
|
||||||
override?: PartialDeep<MarketList>
|
override?: PartialDeep<MarketList>
|
||||||
@ -9,6 +10,8 @@ export const generateMarketList = (
|
|||||||
{
|
{
|
||||||
id: 'market-0',
|
id: 'market-0',
|
||||||
decimalPlaces: 5,
|
decimalPlaces: 5,
|
||||||
|
state: MarketState.Active,
|
||||||
|
tradingMode: MarketTradingMode.Continuous,
|
||||||
data: {
|
data: {
|
||||||
market: {
|
market: {
|
||||||
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
||||||
@ -40,6 +43,8 @@ export const generateMarketList = (
|
|||||||
{
|
{
|
||||||
id: 'market-1',
|
id: 'market-1',
|
||||||
decimalPlaces: 2,
|
decimalPlaces: 2,
|
||||||
|
state: MarketState.Suspended,
|
||||||
|
tradingMode: MarketTradingMode.MonitoringAuction,
|
||||||
data: {
|
data: {
|
||||||
market: {
|
market: {
|
||||||
id: '34d95e10faa00c21d19d382d6d7e6fc9722a96985369f0caec041b0f44b775ed',
|
id: '34d95e10faa00c21d19d382d6d7e6fc9722a96985369f0caec041b0f44b775ed',
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import merge from 'lodash/merge';
|
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 { PartialDeep } from 'type-fest';
|
||||||
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
|
// eslint-disable-next-line @nrwl/nx/enforce-module-boundaries
|
||||||
import type { Market } from '../../../../trading/pages/markets/__generated__/Market';
|
import type { Market } from '../../../../trading/pages/markets/__generated__/Market';
|
||||||
@ -12,6 +16,7 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
|
|||||||
tradingMode: MarketTradingMode.Continuous,
|
tradingMode: MarketTradingMode.Continuous,
|
||||||
state: MarketState.Active,
|
state: MarketState.Active,
|
||||||
decimalPlaces: 5,
|
decimalPlaces: 5,
|
||||||
|
positionDecimalPlaces: 0,
|
||||||
data: {
|
data: {
|
||||||
market: {
|
market: {
|
||||||
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
id: '10cd0a793ad2887b340940337fa6d97a212e0e517fe8e9eab2b5ef3a38633f35',
|
||||||
@ -23,6 +28,7 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
|
|||||||
bestOfferVolume: '100',
|
bestOfferVolume: '100',
|
||||||
bestStaticBidVolume: '482',
|
bestStaticBidVolume: '482',
|
||||||
bestStaticOfferVolume: '2188',
|
bestStaticOfferVolume: '2188',
|
||||||
|
trigger: AuctionTrigger.Unspecified,
|
||||||
__typename: 'MarketData',
|
__typename: 'MarketData',
|
||||||
},
|
},
|
||||||
tradableInstrument: {
|
tradableInstrument: {
|
||||||
@ -40,6 +46,16 @@ export const generateMarket = (override?: PartialDeep<Market>): Market => {
|
|||||||
],
|
],
|
||||||
__typename: 'InstrumentMetadata',
|
__typename: 'InstrumentMetadata',
|
||||||
},
|
},
|
||||||
|
product: {
|
||||||
|
quoteName: 'BTCUSD Monthly',
|
||||||
|
settlementAsset: {
|
||||||
|
id: '000',
|
||||||
|
symbol: 'USD',
|
||||||
|
name: 'United States Dollar',
|
||||||
|
__typename: 'Asset',
|
||||||
|
},
|
||||||
|
__typename: 'Future',
|
||||||
|
},
|
||||||
__typename: 'Instrument',
|
__typename: 'Instrument',
|
||||||
},
|
},
|
||||||
__typename: 'TradableInstrument',
|
__typename: 'TradableInstrument',
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import merge from 'lodash/merge';
|
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 { PartialDeep } from 'type-fest';
|
||||||
import type { Markets, Markets_markets } from '@vegaprotocol/market-list';
|
import type { Markets, Markets_markets } from '@vegaprotocol/market-list';
|
||||||
|
|
||||||
@ -19,6 +23,7 @@ export const generateMarkets = (override?: PartialDeep<Markets>): Markets => {
|
|||||||
bestBidPrice: '0',
|
bestBidPrice: '0',
|
||||||
bestOfferPrice: '0',
|
bestOfferPrice: '0',
|
||||||
markPrice: '4612690058',
|
markPrice: '4612690058',
|
||||||
|
trigger: AuctionTrigger.Unspecified,
|
||||||
__typename: 'MarketData',
|
__typename: 'MarketData',
|
||||||
},
|
},
|
||||||
tradableInstrument: {
|
tradableInstrument: {
|
||||||
@ -51,6 +56,7 @@ export const generateMarkets = (override?: PartialDeep<Markets>): Markets => {
|
|||||||
bestBidPrice: '0',
|
bestBidPrice: '0',
|
||||||
bestOfferPrice: '0',
|
bestOfferPrice: '0',
|
||||||
markPrice: '8441',
|
markPrice: '8441',
|
||||||
|
trigger: AuctionTrigger.Unspecified,
|
||||||
__typename: 'MarketData',
|
__typename: 'MarketData',
|
||||||
},
|
},
|
||||||
tradableInstrument: {
|
tradableInstrument: {
|
||||||
|
Loading…
Reference in New Issue
Block a user