status-im/status-go

View on GitHub

Showing 519 of 519 total issues

Avoid deeply nested control flow statements.
Open

                if err != nil {
                    c.err = err
                    break
                }
Severity: Major
Found in services/wallet/collectibles/commands.go - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if len(existingArchiveIDs) == len(index.Archives) {
                            m.logger.Debug("download cancelled, no new archives")
                            return downloadTaskInfo, nil
                        }
    Severity: Major
    Found in protocol/communities/manager_archive.go - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if err != nil {
                                  m.logger.Error("couldn't save message archive ID", zap.Error(err))
                                  continue
                              }
      Severity: Major
      Found in protocol/communities/manager_archive.go - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

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

          Avoid deeply nested control flow statements.
          Open

                              if receivedMessage.ContentType == protobuf.ChatMessage_IMAGE {
                                  img := message.GetImage()
                                  if img != nil && img.AlbumId != "" && img.AlbumId == image.AlbumId {
                                      skipUpdateUnviewedCountForAlbums = true
                                      break
          Severity: Major
          Found in protocol/messenger_handler.go - About 45 mins to fix

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

            func NewRouter(rpcClient *rpc.Client, transactor *transactions.Transactor, tokenManager *token.Manager, marketManager *market.Manager,
                collectibles *collectibles.Service, collectiblesManager *collectibles.Manager, ensService *ens.Service, stickersService *stickers.Service) *Router {
            Severity: Major
            Found in services/wallet/router/router.go - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                  } else if t.ERC1155TransferTx != nil {
                      return t.ERC1155TransferTx.Amount.ToInt()
                  }
              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/communities/manager_archive.go - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                              } else if err != nil {
                                  log.Debug("error fetching records", "topic", topic, "rendezvous server", srv, "err", err)
                              } else {
                                  for i := range records {
                                      n, err := enrToNode(records[i])
                  Severity: Major
                  Found in discovery/rendezvous.go - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            } else if event.BlockNumber.Cmp(maxKnownBlocks[address]) == 1 {
                                                maxKnownBlocks[address] = event.BlockNumber
                                                newBlocks = true
                                            }
                    Severity: Major
                    Found in services/local-notifications/transaction.go - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              for i = startIndex; i < endIndex; i++ {
                                                  piecesCompleted[i] = false
                                              }
                      Severity: Major
                      Found in protocol/communities/manager_archive.go - About 45 mins to fix

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

                        func NewMultiTransaction(timestamp uint64, fromNetworkID, toNetworkID uint64, fromTxHash, toTxHash common.Hash, fromAddress, toAddress common.Address, fromAsset, toAsset string, fromAmount, toAmount *hexutil.Big, txType MultiTransactionType, crossTxID string) *MultiTransaction {
                        Severity: Major
                        Found in services/wallet/transfer/transaction_manager.go - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                              if err != nil {
                                                  return err
                                              }
                          Severity: Major
                          Found in services/wallet/transfer/commands_sequential.go - About 45 mins to fix

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

                                db *sql.DB,
                                walletFeed *event.Feed,
                                accountsDB *accounts.Database,
                                accountsFeed *event.Feed,
                                settingsFeed *event.Feed,
                            Severity: Major
                            Found in services/wallet/collectibles/service.go - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if to.Cmp(newStartBlock) > 0 {
                                                              log.Debug("found possible start block, we should not search back", "block", to)
                                                              newStartBlock = to // increase newStartBlock if we found a new higher block
                                                          }
                              Severity: Major
                              Found in services/wallet/transfer/concurrent.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 transfersLoaded {
                                                          if c.transfersLoaded == nil {
                                                              c.transfersLoaded = make(map[common.Address]bool)
                                                          }
                                                          c.transfersLoaded[account] = true
                                  Severity: Major
                                  Found in services/wallet/transfer/commands_sequential.go - About 45 mins to fix

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

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

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

                                          ctx context.Context,
                                          messageRequester messageRequester,
                                          batch MailserverBatch,
                                          mailserverID []byte,
                                          logger *zap.Logger,
                                      Severity: Major
                                      Found in protocol/messenger_mailserver.go - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                            if err != nil && !errors.As(err, &e) {
                                                                return err
                                                            }
                                        Severity: Major
                                        Found in protocol/messenger_wallet.go - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language