diff --git a/packages/augur-simplified/src/modules/constants.ts b/packages/augur-simplified/src/modules/constants.ts index 576880caac0..ff9f2e7c379 100644 --- a/packages/augur-simplified/src/modules/constants.ts +++ b/packages/augur-simplified/src/modules/constants.ts @@ -255,3 +255,21 @@ export const DEFAULT_MARKET_VIEW_SETTINGS = { export const CREATE = 'create'; +export const DefaultMarketOutcomes = [ + { + id: 0, + name: 'Invalid', + price: '$0.00', + isInvalid: true, + }, + { + id: 1, + name: 'No', + price: '$0.25', + }, + { + id: 2, + name: 'yes', + price: '$0.75', + }, +]; \ No newline at end of file diff --git a/packages/augur-simplified/src/modules/market/market-view.tsx b/packages/augur-simplified/src/modules/market/market-view.tsx index b0086810abb..d2282dd35b6 100644 --- a/packages/augur-simplified/src/modules/market/market-view.tsx +++ b/packages/augur-simplified/src/modules/market/market-view.tsx @@ -17,11 +17,9 @@ import { PositionsLiquidityViewSwitcher, TransactionsTable, } from '../common/tables'; -import TradingForm, { - DefaultMarketOutcomes, -} from './trading-form'; +import TradingForm from './trading-form'; import { useAppStatusStore } from '../stores/app-status'; -import { USDC, YES_NO, BUY, MARKET_ID_PARAM_NAME, ETH } from '../constants'; +import { USDC, YES_NO, BUY, MARKET_ID_PARAM_NAME, ETH, DefaultMarketOutcomes } from '../constants'; import parseQuery from '../routes/helpers/parse-query'; import { AmmExchange, MarketInfo } from '../types'; import { formatDai } from '../../utils/format-number'; diff --git a/packages/augur-simplified/src/modules/market/trading-form.tsx b/packages/augur-simplified/src/modules/market/trading-form.tsx index d6424321115..d037df08584 100644 --- a/packages/augur-simplified/src/modules/market/trading-form.tsx +++ b/packages/augur-simplified/src/modules/market/trading-form.tsx @@ -45,25 +45,6 @@ import { useCanEnterCashPosition, useCanExitCashPosition } from '../stores/utils const AVG_PRICE_TIP = 'The difference between the market price and estimated price due to trade size.'; -export const DefaultMarketOutcomes = [ - { - id: 0, - name: 'Invalid', - price: '$0.00', - isInvalid: true, - }, - { - id: 1, - name: 'No', - price: '$0.25', - }, - { - id: 2, - name: 'yes', - price: '$0.75', - }, -]; - interface InfoNumber { label: string; value: string; diff --git a/packages/augur-simplified/src/modules/sidebar/sidebar.tsx b/packages/augur-simplified/src/modules/sidebar/sidebar.tsx index b91a6abf08e..d95cc62314a 100644 --- a/packages/augur-simplified/src/modules/sidebar/sidebar.tsx +++ b/packages/augur-simplified/src/modules/sidebar/sidebar.tsx @@ -21,21 +21,7 @@ import { marketStatusItems, sortByItems, } from '../constants'; - -export function isMobileBrowser(): boolean { - return ( - navigator.userAgent.indexOf('Android') > -1 || - navigator.userAgent.indexOf('webOS') > -1 || - navigator.userAgent.indexOf('Windows Phone') > -1 - ); -} - -export function isMobileBrowserTall(): boolean { - return ( - navigator.userAgent.indexOf('iPhone') > -1 || - navigator.userAgent.indexOf('iPad') > -1 - ); -} +import { isMobileBrowser, isMobileBrowserTall } from '../../utils/common-functions'; interface SideBarHeaderProps { header?: string; diff --git a/packages/augur-simplified/src/modules/types.ts b/packages/augur-simplified/src/modules/types.ts index 666c9627330..7ee20b3453e 100644 --- a/packages/augur-simplified/src/modules/types.ts +++ b/packages/augur-simplified/src/modules/types.ts @@ -1194,6 +1194,7 @@ export interface LiquidityBreakdown { yesShares: string; noShares: string; lpTokens?: string; + cashAmount?: string; } export interface AddLiquidityBreakdown extends LiquidityBreakdown { lpTokens: string; diff --git a/packages/augur-simplified/src/utils/common-functions.ts b/packages/augur-simplified/src/utils/common-functions.ts new file mode 100644 index 00000000000..a30c6ae77b8 --- /dev/null +++ b/packages/augur-simplified/src/utils/common-functions.ts @@ -0,0 +1,14 @@ +export function isMobileBrowser(): boolean { + return ( + navigator.userAgent.indexOf('Android') > -1 || + navigator.userAgent.indexOf('webOS') > -1 || + navigator.userAgent.indexOf('Windows Phone') > -1 + ); + } + + export function isMobileBrowserTall(): boolean { + return ( + navigator.userAgent.indexOf('iPhone') > -1 || + navigator.userAgent.indexOf('iPad') > -1 + ); + } \ No newline at end of file