synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Function createBridgeTest has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const createBridgeTest = (
  fastBridgeRouter: FastBridgeRouter,
  bridgeParams: BridgeTestsParams,
  originQuery: Query,
  destQuery: Query
Severity: Minor
Found in packages/sdk-router/src/rfq/fastBridgeRouter.test.ts - About 1 hr to fix

    Function getToStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getToStyleForCoin = (tokenColor: string): string => {
      switch (tokenColor) {
        case ColorOptions.GRAY:
          return `to-gray-300`
        case ColorOptions.YELLOW:
    Severity: Minor
    Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

      Function getSwapBorderStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const getSwapBorderStyleForCoin = (tokenColor: string): string => {
        switch (tokenColor) {
          case ColorOptions.GRAY:
            return `border-gray-50 dark:border-opacity-20 dark:border-gray-700`
          case ColorOptions.YELLOW:
      Severity: Minor
      Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

        Function getInputBorderFocusStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const getInputBorderFocusStyleForCoin = (tokenColor: string): string => {
          switch (tokenColor) {
            case ColorOptions.GRAY:
              return `focus-within:border-gray-200 dark:focus-within:border-gray-500`
            case ColorOptions.YELLOW:
        Severity: Minor
        Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

          Function getFromStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const getFromStyleForCoin = (tokenColor: string): string => {
            switch (tokenColor) {
              case ColorOptions.GRAY:
                return `from-gray-300`
              case ColorOptions.YELLOW:
          Severity: Minor
          Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

            Function getButtonStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const getButtonStyleForCoin = (tokenColor: string) => {
              switch (tokenColor) {
                case ColorOptions.GRAY:
                  return `hover:border-gray-100 dark:hover:border-opacity-50 dark:hover:!border-gray-700`
                case ColorOptions.YELLOW:
            Severity: Minor
            Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

              Function getCoinTextColor has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const getCoinTextColor = (tokenColor: string): string => {
                switch (tokenColor) {
                  case ColorOptions.GRAY:
                    return `text-gray-500 group-hover:text-gray-400`
                  case ColorOptions.YELLOW:
              Severity: Minor
              Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                Function getMenuItemStyleForCoinDark has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const getMenuItemStyleForCoinDark = (tokenColor: string): string => {
                  switch (tokenColor) {
                    case ColorOptions.GRAY:
                      return `dark:hover:bg-opacity-20 dark:focus:bg-opacity-20 dark:active:bg-opacity-20 dark:hover:bg-gray-500 dark:focus:bg-gray-500 dark:active:bg-gray-500`
                    case ColorOptions.YELLOW:
                Severity: Minor
                Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                  Function getMenuItemBgForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export const getMenuItemBgForCoin = (tokenColor: string): string => {
                    switch (tokenColor) {
                      case ColorOptions.GRAY:
                        return `bg-gray-500 bg-opacity-20 dark:bg-opacity-20 dark:bg-gray-700`
                      case ColorOptions.YELLOW:
                  Severity: Minor
                  Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                    Function getMenuItemStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const getMenuItemStyleForCoin = (tokenColor: string): string => {
                      switch (tokenColor) {
                        case ColorOptions.GRAY:
                          return `hover:bg-opacity-20 hover:bg-gray-500 focus:bg-gray-500 active:bg-gray-500 active:bg-opacity-20 focus:bg-opacity-20`
                        case ColorOptions.YELLOW:
                    Severity: Minor
                    Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                      Function getSwapBorderHoverStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const getSwapBorderHoverStyleForCoin = (tokenColor: string): string => {
                        switch (tokenColor) {
                          case ColorOptions.GRAY:
                            return `hover:border-gray-100 dark:hover:border-opacity-50 dark:hover:!border-gray-700`
                          case ColorOptions.YELLOW:
                      Severity: Minor
                      Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                        Function getBorderStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const getBorderStyleForCoin = (tokenColor: string): string => {
                          switch (tokenColor) {
                            case ColorOptions.GRAY:
                              return `border-gray-300`
                            case ColorOptions.YELLOW:
                        Severity: Minor
                        Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                          Function getSwapHoverStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const getSwapHoverStyleForCoin = (tokenColor: string): string => {
                            switch (tokenColor) {
                              case ColorOptions.GRAY:
                                return `hover:shadow-gray-xl border-gray-100`
                              case ColorOptions.YELLOW:
                          Severity: Minor
                          Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                            Function getSwapCardShadowStyleForCoin has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const getSwapCardShadowStyleForCoin = (tokenColor: string): string => {
                              switch (tokenColor) {
                                case ColorOptions.GRAY:
                                  return `shadow-gray-xl hover:shadow-gray-2xl`
                                case ColorOptions.YELLOW:
                            Severity: Minor
                            Found in packages/synapse-interface/styles/tokens.ts - About 1 hr to fix

                              Function calls has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                const calls = validTokens.map((token: BridgeableToken) => {
                                  const tokenAddress: string = token.addresses[chainId]
                              
                                  if (tokenAddress === ZeroAddress) {
                                    const tokenContract = new ethers.Contract(
                              Severity: Minor
                              Found in packages/widget/src/utils/actions/fetchTokenBalances.ts - About 1 hr to fix

                                Function HistoricMax has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const HistoricMax = () => {
                                  const t = useTranslations('FauxBridge')
                                  return (
                                    <div className="relative pointer-events-none group">
                                      <div className="absolute right-0 hidden mb-2 origin-bottom-right bottom-full group-hover:block animate-slide-up">

                                  Function useExchangeRateInfo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const useExchangeRateInfo = (value, exchangeRate) => {
                                    const safeExchangeRate = typeof exchangeRate === 'bigint' ? exchangeRate : 0n
                                    const safeFromAmount = value ?? '0'
                                  
                                    const formattedExchangeRate = formatBigIntToString(safeExchangeRate, 18, 4)

                                    Method exporter.vpriceStats has 10 return statements (exceeds 4 allowed).
                                    Open

                                    func (e *exporter) vpriceStats(ctx context.Context, chainID int, tokenID string) error {
                                        client, err := e.omnirpcClient.GetConfirmationsClient(ctx, chainID, 1)
                                        if err != nil {
                                            return fmt.Errorf("could not get confirmations client: %w", err)
                                        }
                                    Severity: Major
                                    Found in contrib/promexporter/exporters/bridge.go - About 1 hr to fix

                                      Function compileSolidity has 10 return statements (exceeds 4 allowed).
                                      Open

                                      func compileSolidity(version string, filePath string, optimizeRuns int, evmVersion *string) (map[string]*compiler.Contract, error) {
                                          runFile, err := createRunFile(version)
                                          if err != nil {
                                              return nil, err
                                          }
                                      Severity: Major
                                      Found in tools/abigen/internal/generate.go - About 1 hr to fix

                                        Function getChangeTreeFromGit has 10 return statements (exceeds 4 allowed).
                                        Open

                                        func getChangeTreeFromGit(repoPath string, ghContext *actionscore.Context, head, base string) (tree.Tree, error) {
                                            // open the repository
                                            repository, err := git.PlainOpen(repoPath)
                                            if err != nil {
                                                return nil, fmt.Errorf("could not open repository %s: %w", repoPath, err)
                                        Severity: Major
                                        Found in contrib/git-changes-action/detector/git/git.go - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language