xylabs/sdk-react

View on GitHub
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx

Summary

Maintainability
A
3 hrs
Test Coverage

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

const StorybookEntry = {
  argTypes: {},
  component: EthAccountBox,
  parameters: { docs: { page: null } },
  title: 'crypto/EthAccount/Box',
packages/appbar/src/AppBar/Application.stories.tsx on lines 10..15
packages/appbar/src/AppBarEx.stories.tsx on lines 9..14
packages/appbar/src/SiteMenu/MenuListItem/MenuListItemContainer.stories.tsx on lines 10..15
packages/appbar/src/Toolbar/Context/ContextToolbar.stories.tsx on lines 7..12
packages/base-page/src/components/BasePage/BasePage.stories.tsx on lines 7..12
packages/button/src/components/ButtonEx.stories.tsx on lines 8..13
packages/common/src/components/Breadcrumbs/BreadcrumbsEx.stories.tsx on lines 7..12
packages/cookie-consent/src/components/CookieConsent.stories.tsx on lines 49..54
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 8..13
packages/crypto/src/components/TokenAmount/TokenAmount.stories.tsx on lines 19..24
packages/crypto/src/wallets/third-party/Coinbase/Coinbase.stories.tsx on lines 12..17
packages/crypto/src/wallets/third-party/MetaMask/MetaMask.stories.tsx on lines 12..17
packages/crypto/src/wallets/third-party/Phantom/Phantom.stories.tsx on lines 12..17
packages/crypto/src/wallets/third-party/Trust/Trust.stories.tsx on lines 12..17
packages/dialogs/src/ErrorDialog.stories.tsx on lines 7..12
packages/dialogs/src/MessageDialog.stories.tsx on lines 6..11
packages/error/src/components/Errors/ErrorViewer.stories.tsx on lines 6..11
packages/error/src/components/Errors/ErrorsViewer.stories.tsx on lines 7..12
packages/error/src/contexts/ErrorReporter/Provider.stories.tsx on lines 9..14
packages/experiments/src/components/Experiments.stories.tsx on lines 7..12
packages/experiments/src/components/ExperimentsDebugger.stories.tsx on lines 6..11
packages/experiments/src/hooks/useExperiments.stories.tsx on lines 42..47
packages/flexbox/src/components/BusyBox/BusyBox.stories.tsx on lines 7..12
packages/flexbox/src/components/FlexCol.stories.tsx on lines 7..12
packages/flexbox/src/components/FlexRow.stories.tsx on lines 7..12
packages/hooks/src/useResetState.stories.tsx on lines 66..71
packages/invertible-theme/src/InvertibleMuiThemeProvider/InvertibleMuiThemeProvider.stories.tsx on lines 12..17
packages/invertible-theme/src/InvertibleThemeProvider.stories.tsx on lines 9..14
packages/link/src/LinkEx.stories.tsx on lines 8..13
packages/number-status/src/NumberStatus.stories.tsx on lines 7..12
packages/pixel-debugger/src/components/PixelDebugger.stories.tsx on lines 10..15
packages/quick-tip-button/src/QuickTipButton.stories.tsx on lines 9..14
packages/shared/src/hooks/useLocalStorage.stories.tsx on lines 43..48
packages/webapp/src/components/Chrome.stories.tsx on lines 13..18
packages/webapp/src/components/NotFoundPage/Page.stories.tsx on lines 5..10

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

Medium.args = {
  address: EthAddress.fromString('0x6792b02f88b32c4fe8e31cfa41ae5af44865f930'),
  addressLength: 'short',
  icon: true,
  shortenedLength: 8,
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 49..56

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

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

Short.args = {
  address: EthAddress.fromString('0x6792b02f88b32c4fe8e31cfa41ae5af44865f930'),
  addressLength: 'short',
  icon: true,
  title: 'Sample EthAccount',
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 24..30
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 77..83
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 94..100
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 22..28
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 68..74
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 85..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 45.

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

Long.args = {
  address: EthAddress.fromString('0x6792b02f88b32c4fe8e31cfa41ae5af44865f930'),
  addressLength: 'long',
  icon: true,
  title: 'Sample EthAccount',
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 60..66
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 77..83
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 94..100
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 22..28
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 68..74
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 85..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 45.

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

AutoIcon.args = {
  address: EthAddress.fromString('0x6792b02f88b32c4fe8e31cfa41ae5af44865f930'),
  addressLength: 'auto',
  icon: true,
  title: 'Sample EthAccount',
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 24..30
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 60..66
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 77..83
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 22..28
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 68..74
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 85..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 45.

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

Auto.args = {
  address: EthAddress.fromString('0x6792b02f88b32c4fe8e31cfa41ae5af44865f930'),
  addressLength: 'auto',
  icon: false,
  title: 'Sample EthAccount',
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 24..30
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 60..66
packages/crypto/src/components/EthAccount/EthAccountBox.stories.tsx on lines 94..100
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 22..28
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 68..74
packages/crypto/src/components/EthAccount/EthAccountButton.stories.tsx on lines 85..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 45.

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

There are no issues that match your filters.

Category
Status