synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const POLYGON_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.POLYGON.id]: '0x7479e1bc2f2473f9e78c89b4210eb6d55d33b645',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 66..91
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 219..244
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 246..271
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 273..298
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 300..325

Duplicated Code

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

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

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

Tuning

This issue has a mass of 170.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const ARBITRUM_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.ARBITRUM.id]: '0xADeac0343C2Ac62DFE5A5f51E896AefFF5Ab513E',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 66..91
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 143..168
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 246..271
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 273..298
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 300..325

Duplicated Code

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

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

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

Tuning

This issue has a mass of 170.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const POLYGON_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.POLYGON.id]: '0x7479e1bc2f2473f9e78c89b4210eb6d55d33b645',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 69..94
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 221..246
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 248..273
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 275..300
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 302..327

Duplicated Code

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

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

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

Tuning

This issue has a mass of 170.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const BOBA_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.BOBA.id]: '0x9D7283A6AeeD9BCd4Ac70876fEA2b69a63DD8cb9',
  },
  decimals: 18,
Severity: Major
Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 5 other locations - About 6 hrs to fix
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 69..94
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 146..171
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 221..246
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 248..273
packages/synapse-interface/constants/tokens/poolMaster.ts on lines 275..300

Duplicated Code

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

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

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

Tuning

This issue has a mass of 170.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

export const HARMONY_POOL_SWAP_TOKEN = new Token({
  addresses: {
    [CHAINS.HARMONY.id]: '0xE269abBFAF52b26D2632F55B6b223A5223088B96',
  },
  decimals: 18,
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 66..91
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 143..168
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 219..244
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 246..271
packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 300..325

Duplicated Code

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

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

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

Tuning

This issue has a mass of 170.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

File index.tsx has 447 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { StandardPageContainer } from '@components/layouts/StandardPageContainer'

export const Terms = () => {
  return (
    <StandardPageContainer title="Terms of Service">
Severity: Minor
Found in packages/explorer-ui/pages/terms/index.tsx - About 6 hrs to fix

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

    export const Install = () => {
      return (
        <svg
          width="48"
          height="48"
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 26..49
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 51..74

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export const Developer = () => {
      return (
        <svg
          width="48"
          height="48"
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 1..24
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 51..74

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

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

    export const Support = () => {
      return (
        <svg
          width="48"
          height="48"
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 1..24
    packages/widget/examples/landing-page/src/components/Icons.tsx on lines 26..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 169.

    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

    export const SYNFRAX: BridgeableToken = {
      addresses: {
        [CHAINS.FANTOM.id]: '0x1852F70512298d56e9c8FDd905e02581E04ddb2a',
        [CHAINS.MOONRIVER.id]: '0xE96AC70907ffF3Efee79f502C985A7A21Bce407d',
        [CHAINS.MOONBEAM.id]: '0xDd47A348AB60c61Ad6B60cA8C31ea5e00eBfAB4F',
    Severity: Major
    Found in packages/widget/src/constants/bridgeable.ts and 3 other locations - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 144..165
    packages/rest-api/src/constants/bridgeable.ts on lines 680..701
    packages/widget/src/constants/bridgeable.ts on lines 144..165

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

    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

    export const NFD: BridgeableToken = {
      addresses: {
        [CHAINS.BNBCHAIN.id]: '0x0fe9778c005a5a6115cbe12b0568a2d50b765a51',
        [CHAINS.AVALANCHE.id]: '0xf1293574ee43950e7a8c9f1005ff097a9a713959',
        [CHAINS.DOGE.id]: '0x868055ADFA27D331d5b69b1BF3469aDAAc3ba7f2',
    Severity: Major
    Found in packages/rest-api/src/constants/bridgeable.ts and 3 other locations - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 680..701
    packages/widget/src/constants/bridgeable.ts on lines 144..165
    packages/widget/src/constants/bridgeable.ts on lines 680..701

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

    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

    export const SYNFRAX: BridgeableToken = {
      addresses: {
        [CHAINS.FANTOM.id]: '0x1852F70512298d56e9c8FDd905e02581E04ddb2a',
        [CHAINS.MOONRIVER.id]: '0xE96AC70907ffF3Efee79f502C985A7A21Bce407d',
        [CHAINS.MOONBEAM.id]: '0xDd47A348AB60c61Ad6B60cA8C31ea5e00eBfAB4F',
    Severity: Major
    Found in packages/rest-api/src/constants/bridgeable.ts and 3 other locations - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 144..165
    packages/widget/src/constants/bridgeable.ts on lines 144..165
    packages/widget/src/constants/bridgeable.ts on lines 680..701

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

    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

    export const NFD: BridgeableToken = {
      addresses: {
        [CHAINS.BNBCHAIN.id]: '0x0fe9778c005a5a6115cbe12b0568a2d50b765a51',
        [CHAINS.AVALANCHE.id]: '0xf1293574ee43950e7a8c9f1005ff097a9a713959',
        [CHAINS.DOGE.id]: '0x868055ADFA27D331d5b69b1BF3469aDAAc3ba7f2',
    Severity: Major
    Found in packages/widget/src/constants/bridgeable.ts and 3 other locations - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 144..165
    packages/rest-api/src/constants/bridgeable.ts on lines 680..701
    packages/widget/src/constants/bridgeable.ts on lines 680..701

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

    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

    Method executionContext._Transaction has 190 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
        fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
    
        out := graphql.NewFieldSet(fields)
        deferred := make(map[string]*graphql.FieldSet)
    Severity: Major
    Found in services/explorer/consumer/client/resolver-client/server.go - About 6 hrs to fix

      Method executionContext._Transaction has 190 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (ec *executionContext) _Transaction(ctx context.Context, sel ast.SelectionSet, obj *model.Transaction) graphql.Marshaler {
          fields := graphql.CollectFields(ec.OperationContext, sel, transactionImplementors)
      
          out := graphql.NewFieldSet(fields)
          deferred := make(map[string]*graphql.FieldSet)
      Severity: Major
      Found in services/scribe/graphql/server/graph/resolver/server.go - About 6 hrs to fix

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

        export const getHoverStyleForButton = (color: string) => {
          switch (color) {
            case ColorOptions.ETH:
              return 'hover:bg-[#5170ad44] hover:dark:bg-[#5170ad44] hover:border-[#5170ad] hover:dark:border-[#5170ad]'
            case ColorOptions.RED:
        Severity: Major
        Found in packages/synapse-interface/styles/hover.ts and 1 other location - About 6 hrs to fix
        packages/synapse-interface/styles/hover.ts on lines 53..83

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

        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 const getActiveStyleForButton = (color: string) => {
          switch (color) {
            case ColorOptions.ETH:
              return 'bg-[#5170ad44] dark:bg-[#5170ad44] border-[#5170ad] dark:border-[#5170ad]'
            case ColorOptions.RED:
        Severity: Major
        Found in packages/synapse-interface/styles/hover.ts and 1 other location - About 6 hrs to fix
        packages/synapse-interface/styles/hover.ts on lines 19..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 167.

        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

        func (_m *ILightManager) GetDispute(opts *bind.CallOpts, index *big.Int) (struct {
            Guard           common.Address
            Notary          common.Address
            SlashedAgent    common.Address
            FraudProver     common.Address
        Severity: Major
        Found in agents/contracts/lightmanager/mocks/i_light_manager.go and 1 other location - About 6 hrs to fix
        agents/contracts/bondingmanager/mocks/i_bonding_manager.go on lines 574..620

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

        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

        func (_m *IBondingManager) GetDispute(opts *bind.CallOpts, index *big.Int) (struct {
            Guard           common.Address
            Notary          common.Address
            SlashedAgent    common.Address
            FraudProver     common.Address
        Severity: Major
        Found in agents/contracts/bondingmanager/mocks/i_bonding_manager.go and 1 other location - About 6 hrs to fix
        agents/contracts/lightmanager/mocks/i_light_manager.go on lines 459..505

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

        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 generateOriginRemainingTokens = (
          originChainId,
          destinationChainId,
          targetTokens
        ) => {
        Severity: Major
        Found in packages/widget/src/components/ui/TokenSelect.tsx and 1 other location - About 6 hrs to fix
        packages/widget/src/components/ui/TokenSelect.tsx on lines 150..179

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 166.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language