polkadot-js/api

View on GitHub

Showing 2,427 of 2,612 total issues

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

    indices: {
      /**
       * The index was not available.
       **/
      InUse: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    scheduler: {
      /**
       * Failed to schedule a call
       **/
      FailedToSchedule: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    vesting: {
      /**
       * Amount being transferred is too low to create a vesting schedule.
       **/
      AmountLow: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    session: {
      /**
       * Registered duplicate key.
       **/
      DuplicatedKey: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    whitelist: {
      /**
       * The call was already whitelisted; No-Op.
       **/
      CallAlreadyWhitelisted: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    session: {
      /**
       * Registered duplicate key.
       **/
      DuplicatedKey: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    indices: {
      /**
       * The index was not available.
       **/
      InUse: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    vesting: {
      /**
       * Amount being transferred is too low to create a vesting schedule.
       **/
      AmountLow: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    whitelist: {
      /**
       * The call was already whitelisted; No-Op.
       **/
      CallAlreadyWhitelisted: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/substrate/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379

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

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

    whitelist: {
      /**
       * The call was already whitelisted; No-Op.
       **/
      CallAlreadyWhitelisted: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    scheduler: {
      /**
       * Failed to schedule a call
       **/
      FailedToSchedule: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/polkadot/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    indices: {
      /**
       * The index was not available.
       **/
      InUse: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    paraInherent: {
      /**
       * A candidate was filtered during inherent execution. This should have only been done
       * during creation.
       **/
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2194..2220
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    vesting: {
      /**
       * Amount being transferred is too low to create a vesting schedule.
       **/
      AmountLow: AugmentedError<ApiType>;
Severity: Major
Found in packages/api-augment/src/kusama/errors.ts and 15 other locations - About 4 hrs to fix
packages/api-augment/src/kusama/errors.ts on lines 807..832
packages/api-augment/src/kusama/errors.ts on lines 1318..1345
packages/api-augment/src/kusama/errors.ts on lines 1753..1778
packages/api-augment/src/kusama/errors.ts on lines 1779..1804
packages/api-augment/src/kusama/errors.ts on lines 2231..2256
packages/api-augment/src/polkadot/errors.ts on lines 754..779
packages/api-augment/src/polkadot/errors.ts on lines 1527..1552
packages/api-augment/src/polkadot/errors.ts on lines 1553..1578
packages/api-augment/src/polkadot/errors.ts on lines 1858..1884
packages/api-augment/src/polkadot/errors.ts on lines 1895..1920
packages/api-augment/src/substrate/errors.ts on lines 1480..1505
packages/api-augment/src/substrate/errors.ts on lines 2617..2642
packages/api-augment/src/substrate/errors.ts on lines 2643..2668
packages/api-augment/src/substrate/errors.ts on lines 3353..3379
packages/api-augment/src/substrate/errors.ts on lines 3390..3415

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

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

    parameters: {
      /**
       * A Parameter was set.
       * 
       * Is also emitted when the value was not changed.
Severity: Major
Found in packages/api-augment/src/kusama/events.ts and 1 other location - About 4 hrs to fix
packages/api-augment/src/substrate/events.ts on lines 1516..1527

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

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

    parameters: {
      /**
       * A Parameter was set.
       * 
       * Is also emitted when the value was not changed.
Severity: Major
Found in packages/api-augment/src/substrate/events.ts and 1 other location - About 4 hrs to fix
packages/api-augment/src/kusama/events.ts on lines 865..876

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

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

  describe('utility', (): void => {
    it('equals on AccountId', (): void => {
      const addr = '0x4119b2e6c3Cb618F4f0B93ac77f9BeeC7FF02887';

      expect(registry.createType('EthereumLookupSource', addr).eq(addr)).toBe(true);
Severity: Major
Found in packages/types/src/ethereum/LookupSource.spec.ts and 1 other location - About 4 hrs to fix
packages/types/src/generic/LookupSource.spec.ts on lines 20..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 124.

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 function subscribeFinalizedBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
  return memo(instanceId, (): Observable<SignedBlockExtended> =>
    api.derive.chain.subscribeFinalizedHeads().pipe(
      switchMap((header) =>
        api.derive.chain.getBlock(header.createdAtHash || header.hash)
Severity: Major
Found in packages/api-derive/src/chain/subscribeFinalizedBlocks.ts and 1 other location - About 4 hrs to fix
packages/api-derive/src/chain/subscribeNewBlocks.ts on lines 16..24

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

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

  describe('utility', (): void => {
    it('equals on AccountId', (): void => {
      const addr = '5DkQbYAExs3M2sZgT1Ec3mKfZnAQCL4Dt9beTCknkCUn5jzo';

      expect(registry.createType('IndicesLookupSource', addr).eq(addr)).toBe(true);
Severity: Major
Found in packages/types/src/generic/LookupSource.spec.ts and 1 other location - About 4 hrs to fix
packages/types/src/ethereum/LookupSource.spec.ts on lines 95..106

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

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 function subscribeNewBlocks (instanceId: string, api: DeriveApi): () => Observable<SignedBlockExtended> {
  return memo(instanceId, (): Observable<SignedBlockExtended> =>
    api.derive.chain.subscribeNewHeads().pipe(
      switchMap((header) =>
        api.derive.chain.getBlock(header.createdAtHash || header.hash)
Severity: Major
Found in packages/api-derive/src/chain/subscribeNewBlocks.ts and 1 other location - About 4 hrs to fix
packages/api-derive/src/chain/subscribeFinalizedBlocks.ts on lines 16..24

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

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