synapsecns/sanguine

View on GitHub

Showing 1,971 of 13,422 total issues

Avoid too many return statements within this function.
Open

    return _(EXISTING_BRIDGE_ROUTES)
      .pickBy((_values, key) => key.endsWith(`-${fromChainId}`))
      .values()
      .flatten()
      .filter((value) => value.endsWith(`-${toChainId}`))
Severity: Major
Found in packages/widget/src/utils/routeMaker/getToTokens.ts - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        return _(EXISTING_BRIDGE_ROUTES)
          .pickBy((values, _key) => values.some((v) => v.endsWith(`-${toChainId}`)))
          .keys()
          .uniq()
          .value()
    Severity: Major
    Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

          return _(EXISTING_BRIDGE_ROUTES)
            .pickBy((values, _key) => {
              return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
            })
            .keys()
      Severity: Major
      Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return _(EXISTING_BRIDGE_ROUTES)
              .entries()
              .filter(([key, _values]) => key.startsWith(`${fromTokenRouteSymbol}-`))
              .filter(([_key, values]) =>
                values.some((v) => getTokenAndChainId(v).chainId === toChainId)
        Severity: Major
        Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

              return _(EXISTING_BRIDGE_ROUTES)
                .pickBy((values, _key) =>
                  values.some((v) => v.startsWith(`${toTokenRouteSymbol}-`))
                )
                .keys()
          Severity: Major
          Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return EXISTING_BRIDGE_ROUTES[`${fromTokenRouteSymbol}-${fromChainId}`]
            Severity: Major
            Found in packages/widget/src/utils/routeMaker/getToTokens.ts - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                  return _(EXISTING_BRIDGE_ROUTES)
                    .chain()
                    .filter((values, _key) => {
                      return values.some((v) => {
                        const { symbol } = getTokenAndChainId(v)
              Severity: Major
              Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return _(EXISTING_BRIDGE_ROUTES)
                      .values()
                      .flatten()
                      .filter((token) => token.startsWith(`${toTokenRouteSymbol}-`))
                      .map((token) => getTokenAndChainId(token).chainId)
                Severity: Major
                Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      return _(EXISTING_BRIDGE_ROUTES)
                        .entries()
                        .filter(([key, _values]) => key.endsWith(`-${fromChainId}`))
                        .map(([_key, values]) => values)
                        .flatten()
                  Severity: Major
                  Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return _(EXISTING_BRIDGE_ROUTES)
                          .pickBy((values, _key) =>
                            values.some((token) => token.startsWith(`${toTokenRouteSymbol}-`))
                          )
                          .keys()
                    Severity: Major
                    Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return _.uniq(
                            EXISTING_BRIDGE_ROUTES[`${fromTokenRouteSymbol}-${fromChainId}`]?.filter(
                              (value) => value.endsWith(`-${toChainId}`)
                            )
                          )
                      Severity: Major
                      Found in packages/widget/src/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                            return _(EXISTING_BRIDGE_ROUTES)
                              .entries()
                              .filter(([key, _values]) => key.startsWith(`${fromTokenRouteSymbol}-`))
                              .map(([_key, values]) => values)
                              .flatten()
                        Severity: Major
                        Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return _(EXISTING_BRIDGE_ROUTES)
                                .pickBy((values, _key) =>
                                  values.some((v) => getTokenAndChainId(v).symbol === toTokenRouteSymbol)
                                )
                                .keys()
                          Severity: Major
                          Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                return _(EXISTING_BRIDGE_ROUTES)
                                  .pickBy((_values, key) => key.endsWith(`-${fromChainId}`))
                                  .pickBy((values, _key) => {
                                    return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
                                  })
                            Severity: Major
                            Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return _(EXISTING_BRIDGE_ROUTES)
                                    .entries()
                                    .filter(([key, _values]) => key.endsWith(`-${fromChainId}`))
                                    .map(([_key, values]) => values)
                                    .flatten()
                              Severity: Major
                              Found in packages/widget/src/utils/routeMaker/getToChainIds.ts - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                    return _(EXISTING_BRIDGE_ROUTES)
                                      .pickBy((values, _key) => {
                                        return _.includes(values, `${toTokenRouteSymbol}-${toChainId}`)
                                      })
                                      .keys()
                                Severity: Major
                                Found in packages/widget/src/utils/routeMaker/getFromTokens.ts - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                      return _(EXISTING_BRIDGE_ROUTES)
                                        .entries()
                                        .filter(([_key, values]) =>
                                          values.some((v) => v.endsWith(`-${toChainId}`))
                                        )
                                  Severity: Major
                                  Found in packages/widget/src/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                        return _(EXISTING_BRIDGE_ROUTES)
                                          .pickBy((_values, key) => key.endsWith(`-${fromChainId}`))
                                          .values()
                                          .flatten()
                                          .uniq()
                                    Severity: Major
                                    Found in packages/widget/src/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                          return _(EXISTING_BRIDGE_ROUTES).values().flatten().uniq().value()
                                      Severity: Major
                                      Found in packages/widget/src/utils/routeMaker/getToTokens.ts - About 30 mins to fix

                                        Avoid too many return statements within this function.
                                        Open

                                            return _(EXISTING_BRIDGE_ROUTES)
                                              .entries()
                                              .filter(([key, _values]) => key.startsWith(`${fromTokenRouteSymbol}-`))
                                              .filter(([_key, values]) =>
                                                values.some((v) => getTokenAndChainId(v).chainId === toChainId)
                                        Severity: Major
                                        Found in packages/widget/src/utils/routeMaker/getFromChainIds.ts - About 30 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language