Showing 529 of 1,757 total issues
Function addMarketCreationTransactions
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function addMarketCreationTransactions(marketsCreated) {
return (dispatch, getState) => {
const marketCreationData = {};
const { loginAccount, marketsData } = getState();
each(marketsCreated, marketIdOrObject => {
Function getUserOpenOrders
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getUserOpenOrders(
marketId,
orders,
orderType,
outcomeId,
Function syncBlockchain
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const syncBlockchain = () => (dispatch, getState) => {
const { gasPriceInfo } = getState();
const blockNumber = parseInt(augur.rpc.getCurrentBlock().number, 16);
augur.api.Controller.getTimestamp((err, augurTimestamp) => {
if (err) console.error(err);
Function getForkMigrationTotals
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getForkMigrationTotals = (universeId, callback = logError) => (
dispatch,
getState
) => {
const { marketsData, universe } = getState();
Function mergeProps
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mergeProps = (sP, dP, oP) => {
const marketId = parseQuery(oP.location.search)[MARKET_ID_PARAM_NAME];
let returnPath = parseQuery(oP.location.search)[RETURN_PARAM_NAME];
const market = selectMarket(marketId);
Function handleMarketFinalizedLog
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadMarketsInfo([log.market], err => {
if (err) return console.error(err);
const { author } = getState().marketsData[log.market];
dispatch(loadReporting([log.market]));
dispatch(getWinningBalance([log.market]));
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { closeModal, marketDescription, type } = this.props;
const { gasEstimate } = this.state;
const reviewDetails = {
title: "Migrate Market",
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { pricePrecision } = this.props;
const s = this.state;
return (
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { selectedOutcome, validateOutcome } = this.props;
const { formattedMigrationTotals } = this.state;
Function determineDrawParams
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function determineDrawParams(options) {
const {
drawContainer,
maxPrice,
minPrice,
Function loadReportingFinal
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const loadReportingFinal = (callback = logError) => (
dispatch,
getState
) => {
const { universe } = getState();
Function constructRelayTransaction
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const constructRelayTransaction = tx => (dispatch, getState) => {
const { notifications } = getState();
const { hash, status } = tx;
const unpackedParams = unpackTransactionParameters(tx);
const timestamp =
Function sortOrders
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function sortOrders(orderBook) {
const sortedOrderBook = {};
const bids = [];
const asks = [];
Object.keys(orderBook).forEach(outcome => {
Function mapStateToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = (state, ownProps) => {
const market = selectMarket(ownProps.marketId);
const userOrders =
state.orderBooks[ownProps.marketId] &&
state.orderBooks[ownProps.marketId][ownProps.selectedOutcome];
Function processFavorites
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const processFavorites = (
stateFavsIn,
storedFavsIn,
networkId,
universeId
Function getUniverseProperties
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getUniverseProperties(universe, callback) {
return (dispatch, getState) => {
const universePayload = { tx: { to: universe.id } };
async.parallel(
Function loadMarketsInfo
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const loadMarketsInfo = (marketIds, callback = logError) => (
dispatch,
getState
) => {
if (!marketIds || marketIds.length === 0) {
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const s = this.state;
return (
<section
Function createCategoricalMarket
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const createCategoricalMarket = async (outcomeNum: number) => {
// page.on('console', msg => console.log('PAGE LOG:', msg.text()));
const currentTimestamp: number = await page.evaluate(() =>
window.integrationHelpers.getCurrentTimestamp()
);
Consider simplifying this complex logical expression. Open
Open
if (
newTradeDetails.side &&
newTradeDetails.numShares &&
loginAccount.address
) {