Skip to content

Commit

Permalink
Merge pull request #1436 from AugurProject/tomhaile/ch9265/minor-erro…
Browse files Browse the repository at this point in the history
…rs-when-creating-new-market

added property for isMobile and added check for ask and bids in array…
  • Loading branch information
stephensprinkle committed Apr 19, 2018
2 parents bed8188 + 52e8560 commit d96a3d5
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -20,10 +20,15 @@ const mapStateToProps = (state, ownProps) => {
const orderBook = formatOrderbook(newMarket.orderBook[selectedOutcome] || [])
const cumulativeOrderBook = orderAndAssignCumulativeShares(orderBook)
const marketDepth = orderForMarketDepth(cumulativeOrderBook)
const orderBookKeys = getOrderBookKeys(marketDepth)
const orderBookKeys = getOrderBookKeys(
marketDepth,
newMarket.type === SCALAR ? createBigNumber(newMarket.scalarSmallNum) : createBigNumber(0),
newMarket.type === SCALAR ? createBigNumber(newMarket.scalarBigNum) : createBigNumber(1),
)
const hasOrders = !!cumulativeOrderBook[BIDS].length || !!cumulativeOrderBook[ASKS].length

return {
isMobile: state.isMobile,
currentBlock: state.blockchain.currentBlockNumber || 0,
currentTimestamp: selectCurrentTimestamp(state),
minPrice: newMarket.type === SCALAR ? createBigNumber(newMarket.scalarSmallNum) : createBigNumber(0),
Expand Down

0 comments on commit d96a3d5

Please sign in to comment.