binary-com/binary-next-gen

View on GitHub

Showing 551 of 551 total issues

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

    it('currencyOptions should exist when available_currencies are passed in account', () => {
        const account = {
            available_currencies: [
                {"fractional_digits":2,"stake_default":0.35,"type":"fiat",
                    "text":"EUR","value":"EUR","group":"fiatCurrency","img":"/img/eur.svg"},
Severity: Major
Found in src/set-currency/__tests__/setCurrency-test.js and 1 other location - About 7 hrs to fix
src/set-currency/__tests__/setCurrency-test.js on lines 44..58

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

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

    it('Radio selector should be rendered with currencyOptions', () => {
        const account = {
            available_currencies: [
                {"fractional_digits":2,"stake_default":0.35,"type":"fiat",
                    "text":"EUR","value":"EUR","group":"fiatCurrency","img":"/img/eur.svg"},
Severity: Major
Found in src/set-currency/__tests__/setCurrency-test.js and 1 other location - About 7 hrs to fix
src/set-currency/__tests__/setCurrency-test.js on lines 28..42

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

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 initAuthorized has 182 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const initAuthorized = async (authData, store) => {
    if (/japan/.test(authData.authorize.landing_company_name)) {
        showError('Sorry, for japan user please login through www.binary.com ');
        store.dispatch(actions.updateAppState('authorized', false));
        store.dispatch(actions.updateToken(''));
Severity: Major
Found in src/_data/LiveData.js - About 7 hrs to fix

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

        onCountryChange = (e: SyntheticEvent) => {
            this.onEntryChange(e);
            const formData = this.state.formData;
            const countryInResidenceList = this.props.residenceList.find(country => country.value === this.props.country_code);
            formData.phone = countryInResidenceList ? `+${countryInResidenceList.phone_idd}` : '';
    Severity: Major
    Found in src/upgrade/UpgradeToRealCard.js and 1 other location - About 6 hrs to fix
    src/upgrade/UpgradeToMaltainvestCard.js on lines 102..110

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

    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

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

      onCountryChange = (e: SyntheticEvent) => {
        this.onEntryChange(e);
        const formData = this.state.formData;
        const countryInResidenceList = this.props.residenceList.find(country => country.value === this.props.country_code);
            formData.phone = countryInResidenceList ? `+${countryInResidenceList.phone_idd}` : '';
    Severity: Major
    Found in src/upgrade/UpgradeToMaltainvestCard.js and 1 other location - About 6 hrs to fix
    src/upgrade/UpgradeToRealCard.js on lines 96..104

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

    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

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

      onFormSubmit = (e: SyntheticEvent) => {
        e.preventDefault();
        const newErrors = this.validationMan.validateAll(this.state.formData);
        this.setState({ errors: newErrors });
        const keys = Object.keys(newErrors);
    Severity: Major
    Found in src/upgrade/UpgradeToMaltainvestCard.js and 1 other location - About 6 hrs to fix
    src/upgrade/UpgradeToRealCard.js on lines 106..117

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

    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

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

        onFormSubmit = (e: SyntheticEvent) => {
            e.preventDefault();
            const newErrors = this.validationMan.validateAll(this.state.formData);
            this.setState({ errors: newErrors });
            const keys = Object.keys(newErrors);
    Severity: Major
    Found in src/upgrade/UpgradeToRealCard.js and 1 other location - About 6 hrs to fix
    src/upgrade/UpgradeToMaltainvestCard.js on lines 130..141

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

    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

        it('should render button when current account has no currency', () => {
            const loginid = 'CR67890';
            const existingAccounts = [
                {
                    id: 'VRTC12345',
    Severity: Major
    Found in src/user-accounts/__tests__/existingAccounts-test.js and 2 other locations - About 6 hrs to fix
    src/user-accounts/__tests__/existingAccounts-test.js on lines 47..76
    src/user-accounts/__tests__/existingAccounts-test.js on lines 78..107

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

    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

        it('should not render button when current account has no currency', () => {
            const loginid = 'CR67890';
            const existingAccounts = [
                {
                    id: 'VRTC12345',
    Severity: Major
    Found in src/user-accounts/__tests__/existingAccounts-test.js and 2 other locations - About 6 hrs to fix
    src/user-accounts/__tests__/existingAccounts-test.js on lines 16..45
    src/user-accounts/__tests__/existingAccounts-test.js on lines 78..107

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

    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

        it('should not render button when there is account without currency but they"re not current account', () => {
            const loginid = 'VRTC12345';
            const existingAccounts = [
                {
                    id: 'VRTC12345',
    Severity: Major
    Found in src/user-accounts/__tests__/existingAccounts-test.js and 2 other locations - About 6 hrs to fix
    src/user-accounts/__tests__/existingAccounts-test.js on lines 16..45
    src/user-accounts/__tests__/existingAccounts-test.js on lines 47..76

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

    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

      it('Timeout until date should be before 6 weeks later', () => {
        const wrapper = mountWithIntl(<SettingsSelfExclusion />);
        const timeoutUntilDate = wrapper.find('#timeout_until_date').hostNodes();
        timeoutUntilDate.instance().value = dateFormat(moment().add(6, 'weeks').add(1, 'days'));
        wrapper.update();
    Severity: Major
    Found in src/settings/__tests__/settingsSelfExclusion-test.js and 2 other locations - About 5 hrs to fix
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 163..172
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 174..183

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

    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

      it('Exclude time cannot be less than 6 months and should have error.', () => {
        const wrapper = mountWithIntl(<SettingsSelfExclusion />);
        const excludeUntil = wrapper.find('#exclude_until').hostNodes();
        excludeUntil.instance().value = dateFormat(moment().add(6, 'months').subtract(1, 'days'));
        wrapper.update();
    Severity: Major
    Found in src/settings/__tests__/settingsSelfExclusion-test.js and 2 other locations - About 5 hrs to fix
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 92..101
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 174..183

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

    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

      it('Exclude time cannot be more than 5 years and should have error.', () => {
        const wrapper = mountWithIntl(<SettingsSelfExclusion />);
        const excludeUntil = wrapper.find('#exclude_until').hostNodes();
        excludeUntil.instance().value = dateFormat(moment().add(5, 'years').add(1, 'days'));
        wrapper.update();
    Severity: Major
    Found in src/settings/__tests__/settingsSelfExclusion-test.js and 2 other locations - About 5 hrs to fix
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 92..101
    src/settings/__tests__/settingsSelfExclusion-test.js on lines 163..172

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

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

            it('should return the same result for the same state', () => {
                const state = emptyState();
    
                const first = assetPickerSelectors(state);
                const second = assetPickerSelectors(state);
    Severity: Major
    Found in src/asset-picker/__tests__/AssetPickerSelectors-test.js and 3 other locations - About 5 hrs to fix
    src/portfolio/__tests__/PortfolioSelectors-test.js on lines 17..28
    src/statement/__tests__/statementSelectors-test.js on lines 19..31
    src/user-accounts/__tests__/userAccountSelectors-test.js on lines 19..30

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

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

        it('should return the same result for the same state', () => {
            const state = emptyState();
    
            const first = statementSelectors(state);
            const second = statementSelectors(state);
    Severity: Major
    Found in src/statement/__tests__/statementSelectors-test.js and 3 other locations - About 5 hrs to fix
    src/asset-picker/__tests__/AssetPickerSelectors-test.js on lines 70..82
    src/portfolio/__tests__/PortfolioSelectors-test.js on lines 17..28
    src/user-accounts/__tests__/userAccountSelectors-test.js on lines 19..30

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

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

      it('should return same immutable value for the same input state', () => {
        const state = emptyState();
        const first = userAccountsSelectors(state);
        const second = userAccountsSelectors(state);
    
    
    Severity: Major
    Found in src/user-accounts/__tests__/userAccountSelectors-test.js and 3 other locations - About 5 hrs to fix
    src/asset-picker/__tests__/AssetPickerSelectors-test.js on lines 70..82
    src/portfolio/__tests__/PortfolioSelectors-test.js on lines 17..28
    src/statement/__tests__/statementSelectors-test.js on lines 19..31

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

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

         it('should return same immutable value for the same input state', () => {
             const state = emptyState();
             const first = portfolioSelectors(state);
             const second = portfolioSelectors(state);
    
    
    Severity: Major
    Found in src/portfolio/__tests__/PortfolioSelectors-test.js and 3 other locations - About 5 hrs to fix
    src/asset-picker/__tests__/AssetPickerSelectors-test.js on lines 70..82
    src/statement/__tests__/statementSelectors-test.js on lines 19..31
    src/user-accounts/__tests__/userAccountSelectors-test.js on lines 19..30

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

    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

        it('should render create account table when upgradeInfo has canUpgrade equal to true', () => {
            const loginid = '';
            const account = {};
            const markets = [];
            const nextAccountTitle = '';
    Severity: Major
    Found in src/user-accounts/__tests__/createNewAccount-test.js and 1 other location - About 5 hrs to fix
    src/user-accounts/__tests__/createNewAccount-test.js on lines 42..60

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

    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

              <div className="input-row">
                <select id="place_of_birth" onChange={this.onEntryChange} value={formData.place_of_birth || ''}>
                  <option value="" disabled>Place of Birth</option>
                  {residenceList && residenceList.map((x: Residence) =>
                    <option
    Severity: Major
    Found in src/upgrade/UpgradeToMaltainvestCard.js and 1 other location - About 5 hrs to fix
    src/upgrade/UpgradeToRealCard.js on lines 224..236

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

    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

                        <div className="input-row">
                            <select id="place_of_birth" onChange={this.onEntryChange} value={formData.place_of_birth || ''}>
                                <option value="" disabled>Place of Birth</option>
                                {residenceList && residenceList.map((x: Residence) =>
                                    <option
    Severity: Major
    Found in src/upgrade/UpgradeToRealCard.js and 1 other location - About 5 hrs to fix
    src/upgrade/UpgradeToMaltainvestCard.js on lines 252..264

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

    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