XYOracleNetwork/sdk-xyo-react-js

View on GitHub

Showing 476 of 476 total issues

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

  <FlexCol justifyContent="center">
    <Typography variant="h2">No Block Selected</Typography>
    <Typography variant="subtitle1">Select a block to see details like address, signatures, and payload schemas</Typography>
  </FlexCol>
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 41..44
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 46..49
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 51..54

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

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 Render: ComponentType<PayloadRenderProps & TableCellProps> | undefined
      = payload ? resolver?.resolve(payload)?.components.table.cell : undefined
packages/sdk/packages/payload/packages/table/src/components/DynamicTable/DynamicTableRow.tsx on lines 90..91

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

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

  {
    $meta: {
      signatures: [
        '79960dd5c590a1007bc526729a3ffee3153bb37ace383485ed298b3ba94939fffade54980a02c57119238bd9984d2860b822d29dbb36b04251fab83354b5a7cc',
      ],
Severity: Major
Found in packages/sdk/packages/storybook/src/sampleAddressHistory.ts and 9 other locations - About 55 mins to fix
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 5..17
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 18..30
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 31..43
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 44..56
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 57..69
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 86..98
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 112..124
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 125..137
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 151..163

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

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 Avatar: ComponentType<PayloadRenderProps & AvatarProps> | undefined
      = payload ? resolver?.resolve(payload)?.components.avatar.image : undefined
packages/sdk/packages/payload/packages/table/src/components/DynamicTable/DynamicTableRow.tsx on lines 84..85

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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

                  onClick={async () => {
                    const openUrl = () => window.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(shareUrl)}`)
                    await handleClick(openUrl, 'x')
                  }}
Severity: Minor
Found in packages/sdk/packages/share/src/out/SocialButtonsFlexbox.tsx and 1 other location - About 55 mins to fix
packages/sdk/packages/share/src/out/SocialButtonsFlexbox.tsx on lines 64..67

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

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

          <FlexGrowCol alignItems="flex-start">
            <Typography variant="h5">3,921</Typography>
            <Typography variant="body2">Bound Witnesses</Typography>
          </FlexGrowCol>
Severity: Major
Found in packages/sdk/packages/os/src/components/Profile/Profile.tsx and 3 other locations - About 55 mins to fix
packages/sdk/packages/address/packages/history/src/components/BoundWitnessesBox/ActiveBoundWitness/NoBlockSelectedBox.tsx on lines 6..9
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 41..44
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 46..49

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

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

  {
    $meta: {
      signatures: [
        '35c4aa262694cdf6c72f473e4e2a4b164b35a5f228a6ed1c8345b8a6b7b0d192d6868fc038a09258f2b7016d04157640d7555109102e3c072556f8c4c002543f',
      ],
Severity: Major
Found in packages/sdk/packages/storybook/src/sampleAddressHistory.ts and 9 other locations - About 55 mins to fix
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 5..17
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 18..30
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 31..43
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 44..56
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 57..69
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 99..111
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 112..124
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 125..137
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 151..163

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

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

          <FlexGrowCol alignItems="flex-start">
            <Typography variant="h5">3,921</Typography>
            <Typography variant="body2">Bound Witnesses</Typography>
          </FlexGrowCol>
Severity: Major
Found in packages/sdk/packages/os/src/components/Profile/Profile.tsx and 3 other locations - About 55 mins to fix
packages/sdk/packages/address/packages/history/src/components/BoundWitnessesBox/ActiveBoundWitness/NoBlockSelectedBox.tsx on lines 6..9
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 46..49
packages/sdk/packages/os/src/components/Profile/Profile.tsx on lines 51..54

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

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

    } else if (measure.endsWith('vh')) {
      return (Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2))) / 100) * window.innerHeight
    }
Severity: Minor
Found in packages/sdk/packages/shared/src/lib/getActualPaddingX.ts and 1 other location - About 55 mins to fix
packages/sdk/packages/shared/src/lib/getActualPaddingX.ts on lines 10..14

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

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

  {
    $meta: {
      signatures: [
        '186de1122640fc9d6577765e0b0f6822860994a0fbd1f80354963f89eebc3da01d0a68c36d2c6facab89bd777964c0d5b76103eb35b7900cc69bb1b90231117e',
      ],
Severity: Major
Found in packages/sdk/packages/storybook/src/sampleAddressHistory.ts and 9 other locations - About 55 mins to fix
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 18..30
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 31..43
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 44..56
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 57..69
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 86..98
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 99..111
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 112..124
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 125..137
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 151..163

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

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

                  onClick={async () => {
                    const openUrl = () => window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(shareUrl)}`)
                    await handleClick(openUrl, 'fb')
                  }}
Severity: Minor
Found in packages/sdk/packages/share/src/out/SocialButtonsFlexbox.tsx and 1 other location - About 55 mins to fix
packages/sdk/packages/share/src/out/SocialButtonsFlexbox.tsx on lines 52..55

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

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

  {
    $meta: {
      signatures: [
        '186de1122640fc9d6577765e0b0f6822860994a0fbd1f80354963f89eebc3da01d0a68c36d2c6facab89bd777964c0d5b76103eb35b7900cc69bb1b90231117e',
      ],
Severity: Major
Found in packages/sdk/packages/storybook/src/sampleAddressHistory.ts and 9 other locations - About 55 mins to fix
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 5..17
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 18..30
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 31..43
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 44..56
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 57..69
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 86..98
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 99..111
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 125..137
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 151..163

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

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

    } else if (measure.endsWith('vw')) {
      return (Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2))) / 100) * window.innerWidth
    } else if (measure.endsWith('vh')) {
      return (Number.parseFloat(measure.slice(0, Math.max(0, measure.length - 2))) / 100) * window.innerHeight
    }
Severity: Minor
Found in packages/sdk/packages/shared/src/lib/getActualPaddingX.ts and 1 other location - About 55 mins to fix
packages/sdk/packages/shared/src/lib/getActualPaddingX.ts on lines 12..14

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

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

  {
    $meta: {
      signatures: [
        '2ddd7f65ad5ccdce83318f47040db7f45ef76142d2bb9c549241ac59619bf00a671f1ca5755d4e4b0e59fb8eb11c31e1d26c5d376eb57d8eeee7156469ae770b',
      ],
Severity: Minor
Found in packages/sdk/packages/storybook/src/sampleAddressHistory.ts and 1 other location - About 55 mins to fix
packages/sdk/packages/storybook/src/sampleAddressHistory.ts on lines 70..82

Duplicated Code

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

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

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

Tuning

This issue has a mass of 53.

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 (isEmpty(gasPricePayload) || !gasPricePayload?.data?.standard) {
    return <PayloadDataMissing alertBody="Payload is missing valid gas fee data." sx={{ m: 2 }} />
  }
packages/plugins/packages/ethereum-gas/packages/blocknative/src/components/Card/CardContent.tsx on lines 18..20

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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 (isEmpty(gasPricePayload) || !gasPricePayload?.blockPrices?.length) {
      return <PayloadDataMissing alertBody="Payload is missing valid gas fee data." sx={{ m: 1 }} />
    }
packages/plugins/packages/ethereum-gas/packages/etherchain/packages/v2/src/components/Card/CardContent.tsx on lines 17..19

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

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

  async xnsReservationSuccess(fields: XnsReservationSuccessFields | T) {
    await this.events.custom('XnsReservationSuccess').send(fields as T)
  }
Severity: Major
Found in packages/sdk/packages/user-events/src/XyoEventHandler.ts and 8 other locations - About 50 mins to fix
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 54..56
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 58..60
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 62..64
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 66..68
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 70..72
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 78..80
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 82..84
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 90..92

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

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

  async xnsEstimateFailure(fields: XnsEstimateFailureFields | T) {
    await this.events.custom('XnsEstimateFailure').send(fields as T)
  }
Severity: Major
Found in packages/sdk/packages/user-events/src/XyoEventHandler.ts and 8 other locations - About 50 mins to fix
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 54..56
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 62..64
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 66..68
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 70..72
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 78..80
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 82..84
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 86..88
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 90..92

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

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

  async xnsPurchaseAttempted(fields: XnsPurchaseAttemptedFields | T) {
    await this.events.custom('XnsPurchaseAttempted').send(fields as T)
  }
Severity: Major
Found in packages/sdk/packages/user-events/src/XyoEventHandler.ts and 8 other locations - About 50 mins to fix
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 54..56
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 58..60
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 62..64
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 70..72
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 78..80
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 82..84
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 86..88
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 90..92

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

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

  async xnsEstimateAttempted(fields: XnsEstimateAttemptedFields | T) {
    await this.events.custom('XnsEstimateAttempted').send(fields as T)
  }
Severity: Major
Found in packages/sdk/packages/user-events/src/XyoEventHandler.ts and 8 other locations - About 50 mins to fix
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 58..60
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 62..64
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 66..68
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 70..72
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 78..80
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 82..84
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 86..88
packages/sdk/packages/user-events/src/XyoEventHandler.ts on lines 90..92

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

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