theQRL/block-explorer

View on GitHub

Showing 107 of 158 total issues

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

FlowRouter.route('/richlist', {
  name: 'Richlist.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'richlist' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/', {
  name: 'App.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'appHome' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/block/:blockId', {
  name: 'Block.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'block' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/peers', {
  name: 'Peerstats.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'peerstats' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130

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

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

FlowRouter.route('/a/:aId/:tPage?', {
  name: 'Address.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'address' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/lasttx', {
  name: 'Lasttx.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'lasttx' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/tx/:txId', {
  name: 'Tx.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'tx' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 121..130
imports/startup/client/routes.js on lines 131..140

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

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

FlowRouter.route('/unconfirmed', {
  name: 'Lastunconfirmedtx.home',
  action() {
    if (useMobile()) {
      BlazeLayout.render('appBody', { main: 'lastunconfirmedtx' })
Severity: Major
Found in imports/startup/client/routes.js and 10 other locations - About 2 hrs to fix
imports/startup/client/routes.js on lines 31..40
imports/startup/client/routes.js on lines 41..50
imports/startup/client/routes.js on lines 51..60
imports/startup/client/routes.js on lines 61..70
imports/startup/client/routes.js on lines 71..80
imports/startup/client/routes.js on lines 81..90
imports/startup/client/routes.js on lines 91..100
imports/startup/client/routes.js on lines 101..110
imports/startup/client/routes.js on lines 111..120
imports/startup/client/routes.js on lines 131..140

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

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

      if (error) {
        const myError = errorCallback(error, 'Cannot access API/GetOptimizedAddressState', '**ERROR/getAddressState** ')
        callback(myError, null)
      } else {
        if (response.state.address) {
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 2 hrs to fix
imports/startup/server/index.js on lines 478..493

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

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

      if (error || response.state === null) {
        const myError = errorCallback(
          error,
          'Cannot access API/GetOptimizedAddressState',
          '**ERROR/getAddressState** ',
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 2 hrs to fix
imports/startup/server/index.js on lines 458..467

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

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

    if (this.transactionType === 'transfer_token') {
      if (this.transfer_token.totalOutputs === 1) {
        return hexOrB32(this.transfer_token.addrs_to[0])
      }
      return `${this.transfer_token.totalOutputs} addresses`
Severity: Major
Found in imports/ui/components/block/block.js and 1 other location - About 1 hr to fix
imports/ui/components/block/block.js on lines 107..112

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

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

    if (this.transactionType === 'transfer') {
      if (this.transfer.totalOutputs === 1) {
        return hexOrB32(this.transfer.addrs_to[0])
      }
      return `${this.transfer.totalOutputs} addresses`
Severity: Major
Found in imports/ui/components/block/block.js and 1 other location - About 1 hr to fix
imports/ui/components/block/block.js on lines 113..118

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

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

  if (Meteor.settings.api.tertiaryNode.length > 0) {
    // Set tertiary node
    API_NODES.push({
      address: Meteor.settings.api.tertiaryNode,
      state: false,
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 1 hr to fix
imports/startup/server/index.js on lines 81..88

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

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

  if (Meteor.settings.api.secondaryNode.length > 0) {
    // Set secondary node
    API_NODES.push({
      address: Meteor.settings.api.secondaryNode,
      state: false,
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 1 hr to fix
imports/startup/server/index.js on lines 89..96

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

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 nftBytes = Buffer.concat([
                Buffer.from(thisSymbolResponse.transaction.tx.token.symbol),
                Buffer.from(thisSymbolResponse.transaction.tx.token.name),
              ])
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 1 hr to fix
imports/startup/server/index.js on lines 933..936

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

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 nftBytes = Buffer.concat([
              Buffer.from(output.transaction.tx.token.symbol),
              Buffer.from(output.transaction.tx.token.name),
            ])
Severity: Major
Found in imports/startup/server/index.js and 1 other location - About 1 hr to fix
imports/startup/server/index.js on lines 872..875

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

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

      if (tx.tx.token.name) {
        txEdited.tx.token.name = Buffer.from(txEdited.tx.token.name).toString()
      }
Severity: Major
Found in imports/startup/server/index.js and 3 other locations - About 1 hr to fix
imports/startup/server/index.js on lines 360..362
imports/startup/server/index.js on lines 405..409
imports/startup/server/index.js on lines 410..414

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

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

      if (tx.tx.transfer_token.symbol) {
        txEdited.tx.transfer_token.symbol = Buffer.from(
          txEdited.tx.transfer_token.symbol,
        ).toString()
      }
Severity: Major
Found in imports/startup/server/index.js and 3 other locations - About 1 hr to fix
imports/startup/server/index.js on lines 360..362
imports/startup/server/index.js on lines 363..365
imports/startup/server/index.js on lines 410..414

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

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

      if (tx.tx.transfer_token.name) {
        txEdited.tx.transfer_token.name = Buffer.from(
          txEdited.tx.transfer_token.name,
        ).toString()
      }
Severity: Major
Found in imports/startup/server/index.js and 3 other locations - About 1 hr to fix
imports/startup/server/index.js on lines 360..362
imports/startup/server/index.js on lines 363..365
imports/startup/server/index.js on lines 405..409

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

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

      if (tx.tx.token.symbol) {
        txEdited.tx.token.symbol = Buffer.from(txEdited.tx.token.symbol).toString()
      }
Severity: Major
Found in imports/startup/server/index.js and 3 other locations - About 1 hr to fix
imports/startup/server/index.js on lines 363..365
imports/startup/server/index.js on lines 405..409
imports/startup/server/index.js on lines 410..414

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

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