status-im/status-go

View on GitHub

Showing 519 of 519 total issues

Avoid deeply nested control flow statements.
Open

                        for {
                            select {
                            case <-downloadTicker.C:
                                done := true
                                for i = startIndex; i < endIndex; i++ {
Severity: Major
Found in protocol/communities/manager_archive.go - About 45 mins to fix

    Method mailServer.processRequestInBundles has 8 arguments (exceeds 6 allowed). Consider refactoring.
    Open

        iter Iterator,
        bloom []byte,
        topics [][]byte,
        limit int,
        timeout time.Duration,
    Severity: Major
    Found in mailserver/mailserver.go - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if event.BlockNumber != nil {
                              for _, address := range event.Accounts {
                                  if _, ok := maxKnownBlocks[address]; !ok {
                                      maxKnownBlocks[address] = event.BlockNumber
                                  }
      Severity: Major
      Found in services/local-notifications/transaction.go - About 45 mins to fix

        Function NewAPI has 8 arguments (exceeds 6 allowed). Consider refactoring.
        Open

        func NewAPI(ctx context.Context, acc *accounts.Database, rpcClient *rpc.Client, accountsManager *account.GethManager, pendingTracker *transactions.PendingTxTracker, keyStoreDir string, downloader *ipfs.Downloader, httpServer *server.MediaServer) *API {
        Severity: Major
        Found in services/stickers/api.go - About 45 mins to fix

          Function NewService has 8 arguments (exceeds 6 allowed). Consider refactoring.
          Open

          func NewService(db *sql.DB, accountsDB *accounts.Database, accountFeed *event.Feed, eventFeed *event.Feed, rpcClient *statusrpc.Client, tokenManager *token.Manager, marketManager *market.Manager, balanceCache balance.CacheIface) *Service {
          Severity: Major
          Found in services/wallet/history/service.go - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                } else if typ.T == abi.BoolTy {
                    val, err = toBool(f, data[f.Name])
                } else {
                    err = fmt.Errorf("type %s is not supported", f.Type)
                }
            Severity: Major
            Found in services/typeddata/hash.go - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                  } else if t.ERC1155TransferTx != nil {
                      return types.HexBytes("")
                  }
              Severity: Major
              Found in services/wallet/router/pathprocessor/multipath_processor.go - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if sendPeriod < 60 { //Stop the growing if the timer is > 60s to at least retry every minute
                                            sendPeriod = sendPeriod * 2
                                        }
                Severity: Major
                Found in telemetry/client.go - About 45 mins to fix

                  Method Service.GetOwnedCollectibles has 8 arguments (exceeds 6 allowed). Consider refactoring.
                  Open

                      ctx context.Context,
                      chainIDs []walletCommon.ChainID,
                      addresses []common.Address,
                      filter Filter,
                      offset int,
                  Severity: Major
                  Found in services/wallet/collectibles/service.go - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if err != nil {
                                        return nil, err
                                    }
                    Severity: Major
                    Found in abi-spec/types.go - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                      if err = json.Unmarshal(jsonString, value.Interface()); err != nil {
                                          return nil, err
                                      }
                      Severity: Major
                      Found in abi-spec/types.go - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                        if err != nil {
                                            return err
                                        }
                        Severity: Major
                        Found in protocol/messenger_handler.go - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                          if !skipUpdateUnviewedCountForAlbums {
                                              messages, err := m.persistence.AlbumMessages(chat.ID, image.AlbumId)
                                              if err != nil {
                                                  return err
                                              }
                          Severity: Major
                          Found in protocol/messenger_handler.go - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                if err != nil {
                                                    return nil, err
                                                }
                            Severity: Major
                            Found in protocol/communities/manager_archive.go - About 45 mins to fix

                              Function NewMessage has 8 arguments (exceeds 6 allowed). Consider refactoring.
                              Open

                              func NewMessage(from types.Address, to *types.Address, nonce uint64, amount *big.Int, gasLimit uint64, gasPrice *big.Int, data []byte, checkNonce bool) Message {
                              Severity: Major
                              Found in eth-node/core/types/transaction.go - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                if err != nil {
                                                    return nil, err
                                                }
                                Severity: Major
                                Found in abi-spec/types.go - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                              if existingHash == hash {
                                                                  hasArchive = true
                                                                  break
                                                              }
                                  Severity: Major
                                  Found in protocol/communities/manager_archive.go - About 45 mins to fix

                                    Method API.GetOwnedCollectiblesAsync has 8 arguments (exceeds 6 allowed). Consider refactoring.
                                    Open

                                    func (api *API) GetOwnedCollectiblesAsync(requestID int32, chainIDs []wcommon.ChainID, addresses []common.Address, filter collectibles.Filter, offset int, limit int, dataType collectibles.CollectibleDataType, fetchCriteria collectibles.FetchCriteria) error {
                                    Severity: Major
                                    Found in services/wallet/api.go - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                          } else if t.ERC1155TransferTx != nil {
                                              return types.Address(t.ERC1155TransferTx.Recipient)
                                          }
                                      Severity: Major
                                      Found in services/wallet/router/pathprocessor/multipath_processor.go - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if err != nil {
                                                                return nil, err
                                                            }
                                        Severity: Major
                                        Found in protocol/messenger_handler.go - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language