AugurProject/augur-ui

View on GitHub

Showing 529 of 1,757 total issues

Function addMarketCreationTransactions has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export function addMarketCreationTransactions(marketsCreated) {
  return (dispatch, getState) => {
    const marketCreationData = {};
    const { loginAccount, marketsData } = getState();
    each(marketsCreated, marketIdOrObject => {
Severity: Minor
Found in src/modules/transactions/actions/add-transactions.js - About 1 hr to fix

    Function getUserOpenOrders has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function getUserOpenOrders(
      marketId,
      orders,
      orderType,
      outcomeId,
    Severity: Minor
    Found in src/modules/orders/selectors/user-open-orders.js - About 1 hr to fix

      Function syncBlockchain has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      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);
      Severity: Minor
      Found in src/modules/app/actions/sync-blockchain.js - About 1 hr to fix

        Function getForkMigrationTotals has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const getForkMigrationTotals = (universeId, callback = logError) => (
          dispatch,
          getState
        ) => {
          const { marketsData, universe } = getState();
        Severity: Minor
        Found in src/modules/forking/actions/get-fork-migration-totals.js - About 1 hr to fix

          Function mergeProps has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          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);
          
          
          Severity: Minor
          Found in src/modules/reporting/containers/reporting-dispute.js - About 1 hr to fix

            Function handleMarketFinalizedLog has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            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]));
            Severity: Minor
            Found in src/modules/events/actions/log-handlers.js - About 1 hr to fix

              Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render() {
                  const { closeModal, marketDescription, type } = this.props;
                  const { gasEstimate } = this.state;
                  const reviewDetails = {
                    title: "Migrate Market",
              Severity: Minor
              Found in src/modules/modal/components/modal-migrate-market.jsx - About 1 hr to fix

                Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  render() {
                    const { pricePrecision } = this.props;
                    const s = this.state;
                
                    return (

                  Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const { selectedOutcome, validateOutcome } = this.props;
                  
                      const { formattedMigrationTotals } = this.state;
                  
                  

                    Function determineDrawParams has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function determineDrawParams(options) {
                      const {
                        drawContainer,
                        maxPrice,
                        minPrice,

                      Function loadReportingFinal has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const loadReportingFinal = (callback = logError) => (
                        dispatch,
                        getState
                      ) => {
                        const { universe } = getState();
                      Severity: Minor
                      Found in src/modules/reports/actions/load-reporting-final.js - About 1 hr to fix

                        Function constructRelayTransaction has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const constructRelayTransaction = tx => (dispatch, getState) => {
                          const { notifications } = getState();
                          const { hash, status } = tx;
                          const unpackedParams = unpackTransactionParameters(tx);
                          const timestamp =
                        Severity: Minor
                        Found in src/modules/transactions/actions/construct-relay-transaction.js - About 1 hr to fix

                          Function sortOrders has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function sortOrders(orderBook) {
                            const sortedOrderBook = {};
                            const bids = [];
                            const asks = [];
                            Object.keys(orderBook).forEach(outcome => {
                          Severity: Minor
                          Found in src/modules/orders/helpers/liquidity.js - About 1 hr to fix

                            Function mapStateToProps has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const mapStateToProps = (state, ownProps) => {
                              const market = selectMarket(ownProps.marketId);
                              const userOrders =
                                state.orderBooks[ownProps.marketId] &&
                                state.orderBooks[ownProps.marketId][ownProps.selectedOutcome];
                            Severity: Minor
                            Found in src/modules/market-charts/containers/market-outcome-charts.js - About 1 hr to fix

                              Function processFavorites has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const processFavorites = (
                                stateFavsIn,
                                storedFavsIn,
                                networkId,
                                universeId
                              Severity: Minor
                              Found in src/modules/markets/helpers/favorites-processor.js - About 1 hr to fix

                                Function getUniverseProperties has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function getUniverseProperties(universe, callback) {
                                  return (dispatch, getState) => {
                                    const universePayload = { tx: { to: universe.id } };
                                
                                    async.parallel(
                                Severity: Minor
                                Found in src/modules/universe/actions/load-universe-info.js - About 1 hr to fix

                                  Function loadMarketsInfo has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const loadMarketsInfo = (marketIds, callback = logError) => (
                                    dispatch,
                                    getState
                                  ) => {
                                    if (!marketIds || marketIds.length === 0) {
                                  Severity: Minor
                                  Found in src/modules/markets/actions/load-markets-info.js - About 1 hr to fix

                                    Function render has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      render() {
                                        const s = this.state;
                                    
                                        return (
                                          <section

                                      Function createCategoricalMarket has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                      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()
                                        );
                                      Severity: Minor
                                      Found in integration/helpers/create-markets.ts - About 1 hr to fix

                                        Consider simplifying this complex logical expression.
                                        Open

                                            if (
                                              newTradeDetails.side &&
                                              newTradeDetails.numShares &&
                                              loginAccount.address
                                            ) {
                                        Severity: Critical
                                        Found in src/modules/trades/actions/update-trades-in-progress.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language