synapsecns/sanguine

View on GitHub

Showing 13,422 of 13,422 total issues

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

export const StatCard = ({
  onClick,
  title,
  children,
  active = false,
Severity: Major
Found in packages/explorer-ui/components/pages/Home/Stats.tsx and 1 other location - About 6 hrs to fix
packages/explorer-ui/components/pages/Home/Stats.tsx on lines 111..133

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

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 i_gas_oracle.go has 685 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Code generated by mockery v2.14.0. DO NOT EDIT.

package mocks

import (
Severity: Minor
Found in agents/contracts/gasoracle/mocks/i_gas_oracle.go - About 6 hrs to fix

    Function Txs has a Cognitive Complexity of 42 (exceeds 5 allowed). Consider refactoring.
    Open

    export const Txs = () => {
      const search = useSearchParams()
      const p = Number(search.get('p'))
      const hashSearch = String(search.get('hash'))
    
    
    Severity: Minor
    Found in packages/explorer-ui/pages/txs/index.tsx - About 6 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    export const FANTOM_WETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.FANTOM.id]: '0x0e3dD3403ee498694A8f61B04AFed8919F747f77',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 710..734
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 762..786
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 788..812

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

    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 HARMONY_ONEETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.HARMONY.id]: '0x464d121D3cA63cEEfd390D76f19364D3Bd024cD2',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 735..759
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 788..812

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

    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 CANTO_WETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.CANTO.id]: '0xE7002d7Ee2C2aC7A4286F3C075950CcAc2DB3401',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 709..733
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 735..759

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

    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 HARMONY_ONEETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.HARMONY.id]: '0x464d121D3cA63cEEfd390D76f19364D3Bd024cD2',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 736..760
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 762..786
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 788..812

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

    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 METIS_WETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.METIS.id]: '0x9C1340Bf093d057fA29819575517fb9fE2f04AcE',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 710..734
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 736..760
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 788..812

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

    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 CANTO_WETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.CANTO.id]: '0xE7002d7Ee2C2aC7A4286F3C075950CcAc2DB3401',
      },
      decimals: 18,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/poolMaster.ts and 3 other locations - About 6 hrs to fix
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 710..734
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 736..760
    packages/synapse-interface/constants/tokens/poolMaster.ts on lines 762..786

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

    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 FANTOM_WETH_SWAP_TOKEN = new Token({
      addresses: {
        [CHAINS.FANTOM.id]: '0x0e3dD3403ee498694A8f61B04AFed8919F747f77',
      },
      decimals: 18,
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 709..733
    packages/synapse-constants/src/constants/tokens/poolMaster.ts on lines 788..812

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

    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

                      <div className="flex flex-col items-center sm:flex-row">
                        <IconAndAmount
                          value={fromInfo.value}
                          tokenAddress={fromInfo.tokenAddress}
                          chainId={fromInfo.chainID}
    Severity: Major
    Found in packages/explorer-ui/pages/tx/[kappa].tsx and 1 other location - About 6 hrs to fix
    packages/explorer-ui/pages/tx/[kappa].tsx on lines 183..206

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

    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

                        <div className="flex flex-col items-center sm:flex-row">
                          <IconAndAmount
                            value={toInfo.value}
                            tokenAddress={toInfo.tokenAddress}
                            chainId={toInfo.chainID}
    Severity: Major
    Found in packages/explorer-ui/pages/tx/[kappa].tsx and 1 other location - About 6 hrs to fix
    packages/explorer-ui/pages/tx/[kappa].tsx on lines 154..177

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

    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 (r *RelayerTestSuite) TestCommit() {
        r.T().Skip("TODO, test storage")
    
        rel, err := service.NewRelayer(r.GetTestContext(), r.metrics, r.cfg)
        r.NoError(err)
    Severity: Major
    Found in services/rfq/relayer/service/suite_test.go and 1 other location - About 6 hrs to fix
    services/rfq/relayer/service/suite_test.go on lines 82..117

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

    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 (r *RelayerTestSuite) TestStore() {
        r.T().Skip("TODO, test storage")
    
        rel, err := service.NewRelayer(r.GetTestContext(), r.metrics, r.cfg)
        r.NoError(err)
    Severity: Major
    Found in services/rfq/relayer/service/suite_test.go and 1 other location - About 6 hrs to fix
    services/rfq/relayer/service/suite_test.go on lines 119..155

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

    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

      addresses: {
        [CHAINS.ETHEREUM.id]: NativeTokenAddress,
        [CHAINS.OPTIMISM.id]: NativeTokenAddress,
        [CHAINS.BOBA.id]: NativeTokenAddress,
        [CHAINS.CANTO.id]: '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687',
    Severity: Major
    Found in packages/rest-api/src/constants/bridgeable.ts and 2 other locations - About 6 hrs to fix
    packages/synapse-constants/src/constants/tokens/bridgeable.ts on lines 741..754
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 703..716

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

    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

      addresses: {
        [CHAINS.ETH.id]: nullAddress,
        [CHAINS.OPTIMISM.id]: nullAddress,
        [CHAINS.BOBA.id]: zeroAddress,
        [CHAINS.CANTO.id]: '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687',
    packages/rest-api/src/constants/bridgeable.ts on lines 799..812
    packages/synapse-interface/constants/tokens/bridgeable.ts on lines 703..716

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

    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

      decimals: {
        [CHAINS.ETH.id]: 6,
        [CHAINS.OPTIMISM.id]: 6,
        [CHAINS.BNB.id]: 18,
        [CHAINS.POLYGON.id]: 6,
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 1 other location - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 813..826

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

    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

      addresses: {
        [CHAINS.ETH.id]: zeroAddress,
        [CHAINS.OPTIMISM.id]: zeroAddress,
        [CHAINS.BOBA.id]: zeroAddress,
        [CHAINS.CANTO.id]: '0x5FD55A1B9FC24967C4dB09C513C3BA0DFa7FF687',
    Severity: Major
    Found in packages/synapse-interface/constants/tokens/bridgeable.ts and 2 other locations - About 6 hrs to fix
    packages/rest-api/src/constants/bridgeable.ts on lines 799..812
    packages/synapse-constants/src/constants/tokens/bridgeable.ts on lines 741..754

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

    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

      public subtract(other: Fraction | BigintIsh): Fraction {
        const otherParsed = Fraction.tryParseFraction(other)
        if (JSBI.equal(this.denominator, otherParsed.denominator)) {
          return new Fraction(
            JSBI.subtract(this.numerator, otherParsed.numerator),
    Severity: Major
    Found in packages/sdk-router/src/entities/fractions/fraction.ts and 1 other location - About 6 hrs to fix
    packages/sdk-router/src/entities/fractions/fraction.ts on lines 68..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 162.

    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

      public add(other: Fraction | BigintIsh): Fraction {
        const otherParsed = Fraction.tryParseFraction(other)
        if (JSBI.equal(this.denominator, otherParsed.denominator)) {
          return new Fraction(
            JSBI.add(this.numerator, otherParsed.numerator),
    Severity: Major
    Found in packages/sdk-router/src/entities/fractions/fraction.ts and 1 other location - About 6 hrs to fix
    packages/sdk-router/src/entities/fractions/fraction.ts on lines 85..100

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

    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