binary-com/binary-next-gen

View on GitHub

Showing 389 of 551 total issues

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

  it('First name should have error when input is not valid', () => {
    const wrapper = mountWithIntl(<UpgradeToRealCard {...PROPS} />);
    const firstName = wrapper.find('#first_name').hostNodes();
    firstName.instance().value = 'abcd#$';
    wrapper.update();
Severity: Major
Found in src/upgrade/__tests__/upgradeToRealCard-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..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 132.

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 6 locations. Consider refactoring.
Open

  it('phone should not be valid when format is not valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const phone = wrapper.find('#phone').hostNodes();
    phone.instance().value = 'test 123';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..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 132.

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 6 locations. Consider refactoring.
Open

  it('address city should not be valid when format is not valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressPostCode = wrapper.find('#address_postcode').hostNodes();
    addressPostCode.instance().value = 'test " test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..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 132.

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 6 locations. Consider refactoring.
Open

  it('First name should have error when input is not valid', () => {
    const wrapper = mountWithIntl(<UpgradeToMaltainvestCard {...PROPS} />);
    const firstName = wrapper.find('#first_name').hostNodes();
    firstName.instance().value = 'abcd#$';
    wrapper.update();
Severity: Major
Found in src/upgrade/__tests__/upgradeToMaltainvestCard-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..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 132.

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 6 locations. Consider refactoring.
Open

  it('address line 1 should not be valid when format is not valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressLine1 = wrapper.find('#address_line_1').hostNodes();
    addressLine1.instance().value = 'test " test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 82..91
src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..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 132.

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 6 locations. Consider refactoring.
Open

  it('address city should not be valid when format is not valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressCity = wrapper.find('#address_city').hostNodes();
    addressCity.instance().value = 'test " test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 49..58
src/settings/__tests__/settingsUserInformation-test.js on lines 104..113
src/settings/__tests__/settingsUserInformation-test.js on lines 126..135
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 73..82
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 73..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 132.

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

        case UPDATE_CHART_DATA_BY_SYMBOL: {
            const { symbol, data, dataType } = action;
            if (dataType !== 'ticks') {
                return state;
            }
Severity: Major
Found in src/_reducers/TickReducer.js and 1 other location - About 4 hrs to fix
src/_reducers/OHLCReducer.js on lines 74..85

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 131.

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

        case UPDATE_CHART_DATA_BY_SYMBOL: {
            const { symbol, data, dataType } = action;
            if (dataType !== 'candles') {
                return state;
            }
Severity: Major
Found in src/_reducers/OHLCReducer.js and 1 other location - About 4 hrs to fix
src/_reducers/TickReducer.js on lines 71..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 131.

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 6 locations. Consider refactoring.
Open

  it('address line 1 should be valid when format is valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressLine1 = wrapper.find('#address_line_1').hostNodes();
    addressLine1.instance().value = 'test 123 test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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 127.

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 6 locations. Consider refactoring.
Open

  it('phone should be valid when format is valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const phone = wrapper.find('#phone').hostNodes();
    phone.instance().value = '123 456 789';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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 127.

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 6 locations. Consider refactoring.
Open

  it('First name should be valid when input is valid', () => {
    const wrapper = mountWithIntl(<UpgradeToRealCard {...PROPS} />);
    const firstName = wrapper.find('#first_name').hostNodes();
    firstName.instance().value = 'abcdefg';
    wrapper.update();
Severity: Major
Found in src/upgrade/__tests__/upgradeToRealCard-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71

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 127.

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 6 locations. Consider refactoring.
Open

  it('address city should be valid when format is valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressPostCode = wrapper.find('#address_postcode').hostNodes();
    addressPostCode.instance().value = 'test 123 test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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 127.

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 6 locations. Consider refactoring.
Open

  it('First name should be valid when input is valid', () => {
    const wrapper = mountWithIntl(<UpgradeToMaltainvestCard {...PROPS} />);
    const firstName = wrapper.find('#first_name').hostNodes();
    firstName.instance().value = 'abcdefg';
    wrapper.update();
Severity: Major
Found in src/upgrade/__tests__/upgradeToMaltainvestCard-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
src/settings/__tests__/settingsUserInformation-test.js on lines 71..80
src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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 127.

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 6 locations. Consider refactoring.
Open

  it('address city should be valid when format is valid', () => {
    const wrapper = mountWithIntl(<SettingsUserInformation {...PROPS} />);
    const addressCity = wrapper.find('#address_city').hostNodes();
    addressCity.instance().value = 'test test';
    wrapper.update();
Severity: Major
Found in src/settings/__tests__/settingsUserInformation-test.js and 5 other locations - About 4 hrs to fix
src/settings/__tests__/settingsUserInformation-test.js on lines 38..47
src/settings/__tests__/settingsUserInformation-test.js on lines 93..102
src/settings/__tests__/settingsUserInformation-test.js on lines 115..124
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 62..71
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 62..71

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 127.

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

    sourceOfWealthOptions: [
      {
        value: '',
        text: 'Please select',
        disabled: true,
Severity: Major
Found in src/upgrade/UpgradeCard.options.js and 1 other location - About 4 hrs to fix
src/upgrade/UpgradeCard.options.js on lines 365..403

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 119.

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

    secretQuestionOptions: [
      {
        value: '',
        text: 'Please select',
        disabled: true,
Severity: Major
Found in src/upgrade/UpgradeCard.options.js and 1 other location - About 4 hrs to fix
src/upgrade/UpgradeCard.options.js on lines 207..245

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 119.

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

  const PROPS = {
    residenceList: [{
      phone_idd: '260',
      text: 'Zambia',
      value: 'zm'
Severity: Major
Found in src/upgrade/__tests__/upgradeToRealCard-test.js and 1 other location - About 4 hrs to fix
src/upgrade/__tests__/upgradeToMaltainvestCard-test.js on lines 6..40

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 118.

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

  const PROPS = {
    residenceList: [{
      phone_idd: '260',
      text: 'Zambia',
      value: 'zm'
Severity: Major
Found in src/upgrade/__tests__/upgradeToMaltainvestCard-test.js and 1 other location - About 4 hrs to fix
src/upgrade/__tests__/upgradeToRealCard-test.js on lines 6..40

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 118.

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

export const defaultStakeSelector = state => {
  let stake = 1;
  const account = state.account;
  if (account) {
    const currency = account.get('currency');
Severity: Major
Found in src/_store/directSelectors.js and 1 other location - About 4 hrs to fix
src/_store/directSelectors.js on lines 70..81

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 116.

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

export const fractionalDigitsSelector = state => {
  let digits = 2;
  const account = state.account;
  if (account) {
    const currency = account.get('currency');
Severity: Major
Found in src/_store/directSelectors.js and 1 other location - About 4 hrs to fix
src/_store/directSelectors.js on lines 83..94

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 116.

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

Severity
Category
Status
Source
Language