AugurProject/augur-ui

View on GitHub

Showing 1,757 of 1,757 total issues

Consider simplifying this complex logical expression.
Open

  if (!assembledMarketsCache[marketId]) {
    assembledMarketsCache[marketId] = memoize(
      (
        marketId,
        marketData,
Severity: Critical
Found in src/modules/markets/selectors/market.js - About 2 hrs to fix

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      const t5 = {
        description: "Returns the updated value for is mobile",
        assertions: () => {
          const actual = appStatus(DEFAULT_STATE, {
            type: UPDATE_APP_STATUS,
    Severity: Major
    Found in src/modules/app/reducers/app-status.test.js and 4 other locations - About 2 hrs to fix
    src/modules/app/reducers/app-status.test.js on lines 39..56
    src/modules/app/reducers/app-status.test.js on lines 58..75
    src/modules/app/reducers/app-status.test.js on lines 96..113
    src/modules/app/reducers/app-status.test.js on lines 115..132

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      const t3 = {
        description: "Returns the updated value for has loaded markets",
        assertions: () => {
          const actual = appStatus(DEFAULT_STATE, {
            type: UPDATE_APP_STATUS,
    Severity: Major
    Found in src/modules/app/reducers/app-status.test.js and 4 other locations - About 2 hrs to fix
    src/modules/app/reducers/app-status.test.js on lines 58..75
    src/modules/app/reducers/app-status.test.js on lines 77..94
    src/modules/app/reducers/app-status.test.js on lines 96..113
    src/modules/app/reducers/app-status.test.js on lines 115..132

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      const t4 = {
        description: "Returns the updated value for is animating",
        assertions: () => {
          const actual = appStatus(DEFAULT_STATE, {
            type: UPDATE_APP_STATUS,
    Severity: Major
    Found in src/modules/app/reducers/app-status.test.js and 4 other locations - About 2 hrs to fix
    src/modules/app/reducers/app-status.test.js on lines 39..56
    src/modules/app/reducers/app-status.test.js on lines 77..94
    src/modules/app/reducers/app-status.test.js on lines 96..113
    src/modules/app/reducers/app-status.test.js on lines 115..132

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        test("should dispatch existing market id", () => {
          const store = mocks.mockStore(mocks.state);
          store.dispatch(
            updateOrderStatus({
              orderId: "orderId",
    Severity: Major
    Found in src/modules/orders/actions/update-order-status.test.js and 1 other location - About 2 hrs to fix
    src/modules/orders/actions/update-order-status.test.js on lines 8..20

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        assertions: (done, store) => {
          const sendReputationSpy = jest
            .spyOn(augur.assets, "sendReputation")
            .mockImplementation(() => jest.fn());
          store.dispatch(transferFunds(10, REP, "0xtest2"));
    Severity: Major
    Found in src/modules/auth/actions/transfer-funds.test.js and 1 other location - About 2 hrs to fix
    src/modules/auth/actions/transfer-funds.test.js on lines 40..50

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      const t7 = {
        description: "Returns the updated value for transactions loading",
        assertions: () => {
          const actual = appStatus(DEFAULT_STATE, {
            type: UPDATE_APP_STATUS,
    Severity: Major
    Found in src/modules/app/reducers/app-status.test.js and 4 other locations - About 2 hrs to fix
    src/modules/app/reducers/app-status.test.js on lines 39..56
    src/modules/app/reducers/app-status.test.js on lines 58..75
    src/modules/app/reducers/app-status.test.js on lines 77..94
    src/modules/app/reducers/app-status.test.js on lines 96..113

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        test(`shouldn't dispatch if order cannot be found`, () => {
          const store = mocks.mockStore(mocks.state);
          store.dispatch(
            updateOrderStatus({
              orderId: "nonExistingOrderId",
    Severity: Major
    Found in src/modules/orders/actions/update-order-status.test.js and 1 other location - About 2 hrs to fix
    src/modules/orders/actions/update-order-status.test.js on lines 22..34

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

      const t6 = {
        description: "Returns the updated value for is mobile small",
        assertions: () => {
          const actual = appStatus(DEFAULT_STATE, {
            type: UPDATE_APP_STATUS,
    Severity: Major
    Found in src/modules/app/reducers/app-status.test.js and 4 other locations - About 2 hrs to fix
    src/modules/app/reducers/app-status.test.js on lines 39..56
    src/modules/app/reducers/app-status.test.js on lines 58..75
    src/modules/app/reducers/app-status.test.js on lines 77..94
    src/modules/app/reducers/app-status.test.js on lines 115..132

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      describe("yes/no invalid", () => {
        test(`should call the expected method`, () => {
          const actual = getPayoutNumerators(marketBinary, 1, true).map(n =>
            n.toString()
          );
    Severity: Major
    Found in src/modules/reports/actions/get-payout-numerators.test.js and 2 other locations - About 2 hrs to fix
    src/modules/reports/actions/get-payout-numerators.test.js on lines 147..155
    src/modules/reports/actions/get-payout-numerators.test.js on lines 157..165

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export default function(reports) {
      describe(`loginAccountReports.reports' shape`, () => {
        expect(reports).toBeDefined();
        expect(Array.isArray(reports)).toBe(true);
    
    
    Severity: Major
    Found in src/assertions/my-reports.js and 2 other locations - About 2 hrs to fix
    src/assertions/my-markets.js on lines 4..13
    src/assertions/portfolio-summaries.js on lines 1..10

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      describe("yes/no YES", () => {
        test(`should call the expected method`, () => {
          const actual = getPayoutNumerators(marketBinary, 1, false).map(n =>
            n.toString()
          );
    Severity: Major
    Found in src/modules/reports/actions/get-payout-numerators.test.js and 2 other locations - About 2 hrs to fix
    src/modules/reports/actions/get-payout-numerators.test.js on lines 147..155
    src/modules/reports/actions/get-payout-numerators.test.js on lines 167..175

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export default function(portfolioSummaries) {
      describe(`portfolio's summaries shape`, () => {
        expect(portfolioSummaries).toBeDefined();
        expect(Array.isArray(portfolioSummaries)).toBe(true);
    
    
    Severity: Major
    Found in src/assertions/portfolio-summaries.js and 2 other locations - About 2 hrs to fix
    src/assertions/my-markets.js on lines 4..13
    src/assertions/my-reports.js on lines 4..13

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

      describe("yes/no NO", () => {
        test(`should call the expected method`, () => {
          const actual = getPayoutNumerators(marketBinary, 0, false).map(n =>
            n.toString()
          );
    Severity: Major
    Found in src/modules/reports/actions/get-payout-numerators.test.js and 2 other locations - About 2 hrs to fix
    src/modules/reports/actions/get-payout-numerators.test.js on lines 157..165
    src/modules/reports/actions/get-payout-numerators.test.js on lines 167..175

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      finalizeMarket = () => {
        const { finalizeMarket, market } = this.props;
        this.setState({ disableFinalize: true });
        finalizeMarket(market.id, err => {
          if (err) this.setState({ disableFinalize: false });
    src/modules/portfolio/components/market-portfolio-card/market-portfolio-card.jsx on lines 84..90

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

    export default function(myMarkets) {
      describe(`myMarkets' shape`, () => {
        expect(myMarkets).toBeDefined();
        expect(Array.isArray(myMarkets)).toBe(true);
    
    
    Severity: Major
    Found in src/assertions/my-markets.js and 2 other locations - About 2 hrs to fix
    src/assertions/my-reports.js on lines 4..13
    src/assertions/portfolio-summaries.js on lines 1..10

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

      claimProceeds = () => {
        const { claimTradingProceeds, market } = this.props;
        this.setState({ claimClicked: true });
        claimTradingProceeds(market.id, err => {
          if (err) this.setState({ claimClicked: false });
    src/modules/portfolio/components/market-portfolio-card/market-portfolio-card.jsx on lines 76..82

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        assertions: (done, store) => {
          const sendEtherSpy = jest
            .spyOn(augur.assets, "sendEther")
            .mockImplementation(() => jest.fn());
    
    
    Severity: Major
    Found in src/modules/auth/actions/transfer-funds.test.js and 1 other location - About 2 hrs to fix
    src/modules/auth/actions/transfer-funds.test.js on lines 63..70

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 88.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function pollForAccount has 66 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function pollForAccount(dispatch, getState, callback) {
      const { loginAccount } = getState();
      let accountType =
        loginAccount && loginAccount.meta && loginAccount.meta.accountType;
    
    
    Severity: Major
    Found in src/modules/app/actions/init-augur.js - About 2 hrs to fix

      Function loadUniverseInfo has 66 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function loadUniverseInfo(callback = logError) {
        return (dispatch, getState) => {
          const { universe, loginAccount, marketsData } = getState();
          const universeId = universe.id || UNIVERSE_ID;
      
      
      Severity: Major
      Found in src/modules/universe/actions/load-universe-info.js - About 2 hrs to fix
        Severity
        Category
        Status
        Source
        Language