2023-09-12 18:10:17 +00:00
|
|
|
import { MarketState } from '@vegaprotocol/types';
|
|
|
|
|
|
|
|
// Used for sort order and filter
|
|
|
|
const MARKET_TEMPLATE = [
|
|
|
|
MarketState.STATE_ACTIVE,
|
|
|
|
MarketState.STATE_SUSPENDED,
|
|
|
|
MarketState.STATE_PENDING,
|
2023-10-02 17:00:49 +00:00
|
|
|
MarketState.STATE_SUSPENDED_VIA_GOVERNANCE,
|
2023-09-12 18:10:17 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
export const isMarketActive = (state: MarketState) => {
|
|
|
|
return MARKET_TEMPLATE.includes(state);
|
|
|
|
};
|