status-im/status-go

View on GitHub

Showing 521 of 521 total issues

Method HopL1HopBridgeSession.Withdraw has 11 arguments (exceeds 6 allowed). Consider refactoring.
Open

func (_HopL1HopBridge *HopL1HopBridgeSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) {
Severity: Major
Found in contracts/hop/l1Contracts/l1HopBridge/l1HopBridge.go - About 1 hr to fix

    Method HopL2ArbitrumBridgeTransactorSession.Withdraw has 11 arguments (exceeds 6 allowed). Consider refactoring.
    Open

    func (_HopL2ArbitrumBridge *HopL2ArbitrumBridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) {
    Severity: Major
    Found in contracts/hop/l2Contracts/l2ArbitrumBridge/l2ArbitrumBridge.go - About 1 hr to fix

      Method HopL1Erc20BridgeTransactorSession.Withdraw has 11 arguments (exceeds 6 allowed). Consider refactoring.
      Open

      func (_HopL1Erc20Bridge *HopL1Erc20BridgeTransactorSession) Withdraw(recipient common.Address, amount *big.Int, transferNonce [32]byte, bonderFee *big.Int, amountOutMin *big.Int, deadline *big.Int, rootHash [32]byte, transferRootTotalAmount *big.Int, transferIdTreeIndex *big.Int, siblings [][32]byte, totalLeaves *big.Int) (*types.Transaction, error) {
      Severity: Major
      Found in contracts/hop/l1Contracts/l1Erc20Bridge/l1Erc20Bridge.go - About 1 hr to fix

        Method Router.SuggestedRoutes has 11 arguments (exceeds 6 allowed). Consider refactoring.
        Open

            ctx context.Context,
            sendType SendType,
            addrFrom common.Address,
            addrTo common.Address,
            amountIn *big.Int,
        Severity: Major
        Found in services/wallet/router/router.go - About 1 hr to fix

          Function NewReactor has 11 arguments (exceeds 6 allowed). Consider refactoring.
          Open

          func NewReactor(db *Database, blockDAO *BlockDAO, blockRangesSeqDAO *BlockRangeSequentialDAO, accountsDB *accounts.Database, feed *event.Feed, tm *TransactionManager,
              pendingTxManager *transactions.PendingTxTracker, tokenManager *token.Manager,
              balanceCacher balance.Cacher, omitHistory bool, blockChainState *blockchainstate.BlockChainState) *Reactor {
          Severity: Major
          Found in services/wallet/transfer/reactor.go - About 1 hr to fix

            Function NewManager has 11 arguments (exceeds 6 allowed). Consider refactoring.
            Open

            func NewManager(identity *ecdsa.PrivateKey, installationID string, db *sql.DB, encryptor *encryption.Protocol, logger *zap.Logger, ensverifier *ens.Verifier, ownerVerifier OwnerVerifier, transport *transport.Transport, timesource common.TimeSource, keyDistributor KeyDistributor, opts ...ManagerOption) (*Manager, error) {
            Severity: Major
            Found in protocol/communities/manager.go - About 1 hr to fix

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

                  for i, tc := range testCases {
                      t.Run(fmt.Sprintf("%d", i+1), func(t *testing.T) {
                          ctx, err := mentionManager.OnChangeText(chatID, tc.inputText)
                          require.NoError(t, err)
                          t.Logf("Input: %+v, MentionState:%+v, InputSegments:%+v\n", tc.inputText, ctx.MentionState, ctx.InputSegments)
              Severity: Major
              Found in protocol/messenger_mention_test.go and 1 other location - About 1 hr to fix
              protocol/messenger_mention_test.go on lines 850..857

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

              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

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

                  for i, tc := range testCases {
                      t.Run(fmt.Sprintf("%d", i+1), func(t *testing.T) {
                          ctx, err := mentionManager.OnChangeText(chatID, tc.inputText)
                          require.NoError(t, err)
                          t.Logf("Input: %+v, MentionState:%+v, InputSegments:%+v\n", tc.inputText, ctx.MentionState, ctx.InputSegments)
              Severity: Major
              Found in protocol/messenger_mention_test.go and 1 other location - About 1 hr to fix
              protocol/messenger_mention_test.go on lines 795..802

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

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                  _, err = WaitOnMessengerResponse(
                      s.bob,
                      func(r *MessengerResponse) bool {
                          c, err := s.bob.GetCommunityByID(community.ID())
                          if err != nil {
              Severity: Major
              Found in protocol/communities_messenger_token_permissions_test.go and 2 other locations - About 1 hr to fix
              protocol/communities_messenger_token_permissions_test.go on lines 1162..1176
              protocol/communities_messenger_token_permissions_test.go on lines 1378..1392

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

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                  _, err = WaitOnMessengerResponse(
                      s.bob,
                      func(r *MessengerResponse) bool {
                          c, err := s.bob.GetCommunityByID(community.ID())
                          if err != nil {
              Severity: Major
              Found in protocol/communities_messenger_token_permissions_test.go and 2 other locations - About 1 hr to fix
              protocol/communities_messenger_token_permissions_test.go on lines 1378..1392
              protocol/communities_messenger_token_permissions_test.go on lines 1470..1484

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

              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

              Identical blocks of code found in 3 locations. Consider refactoring.
              Open

                  _, err = WaitOnMessengerResponse(
                      s.bob,
                      func(r *MessengerResponse) bool {
                          c, err := s.bob.GetCommunityByID(community.ID())
                          if err != nil {
              Severity: Major
              Found in protocol/communities_messenger_token_permissions_test.go and 2 other locations - About 1 hr to fix
              protocol/communities_messenger_token_permissions_test.go on lines 1162..1176
              protocol/communities_messenger_token_permissions_test.go on lines 1470..1484

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

              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

              Function DeployCollectibles has 10 arguments (exceeds 6 allowed). Consider refactoring.
              Open

              func DeployCollectibles(auth *bind.TransactOpts, backend bind.ContractBackend, _name string, _symbol string, _maxSupply *big.Int, _remoteBurnable bool, _transferable bool, _baseTokenURI string, _ownerToken common.Address, _masterToken common.Address) (common.Address, *types.Transaction, *Collectibles, error) {
              Severity: Major
              Found in contracts/community-tokens/collectibles/Collectibles.go - About 1 hr to fix

                Function loadTransfers has 10 arguments (exceeds 6 allowed). Consider refactoring.
                Open

                func loadTransfers(ctx context.Context, blockDAO *BlockDAO, db *Database,
                    chainClient chain.ClientInterface, blocksLimitPerAccount int, blocksByAddress map[common.Address][]*big.Int,
                    transactionManager *TransactionManager, pendingTxManager *transactions.PendingTxTracker,
                    tokenManager *token.Manager, feed *event.Feed) error {
                Severity: Major
                Found in services/wallet/transfer/commands.go - About 1 hr to fix

                  Method API.GetSuggestedRoutes has 10 arguments (exceeds 6 allowed). Consider refactoring.
                  Open

                      ctx context.Context,
                      sendType router.SendType,
                      addrFrom common.Address,
                      addrTo common.Address,
                      amountIn *hexutil.Big,
                  Severity: Major
                  Found in services/wallet/api.go - About 1 hr to fix

                    Function NewTransferController has 10 arguments (exceeds 6 allowed). Consider refactoring.
                    Open

                    func NewTransferController(db *sql.DB, accountsDB *statusaccounts.Database, rpcClient *rpc.Client, accountFeed *event.Feed, transferFeed *event.Feed,
                        transactionManager *TransactionManager, pendingTxManager *transactions.PendingTxTracker, tokenManager *token.Manager,
                        balanceCacher balance.Cacher, blockChainState *blockchainstate.BlockChainState) *Controller {
                    Severity: Major
                    Found in services/wallet/transfer/controller.go - About 1 hr to fix

                      Method Transport.SendMessagesRequestForTopics has 10 arguments (exceeds 6 allowed). Consider refactoring.
                      Open

                          ctx context.Context,
                          peerID []byte,
                          from, to uint32,
                          previousCursor []byte,
                          previousStoreCursor *types.StoreRequestCursor,
                      Severity: Major
                      Found in protocol/transport/transport.go - About 1 hr to fix

                        Function NewTokenManager has 10 arguments (exceeds 6 allowed). Consider refactoring.
                        Open

                            db *sql.DB,
                            RPCClient rpc.ClientInterface,
                            communityManager *community.Manager,
                            networkManager network.ManagerInterface,
                            appDB *sql.DB,
                        Severity: Major
                        Found in services/wallet/token/token.go - About 1 hr to fix

                          Method mockTransport.SendMessagesRequestForTopics has 10 arguments (exceeds 6 allowed). Consider refactoring.
                          Open

                              ctx context.Context,
                              peerID []byte,
                              from, to uint32,
                              previousCursor []byte,
                              previousStoreCursor *types.StoreRequestCursor,
                          Severity: Major
                          Found in protocol/messenger_mailserver_processMailserverBatch_test.go - About 1 hr to fix

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

                                response, err = WaitOnMessengerResponse(
                                    alice,
                                    func(r *MessengerResponse) bool {
                                        return len(r.Messages()) == 1 && len(r.ActivityCenterNotifications()) == 1 &&
                                            r.Messages()[0].ID == r.ActivityCenterNotifications()[0].Message.ID &&
                            Severity: Major
                            Found in protocol/messenger_activity_center_test.go and 1 other location - About 1 hr to fix
                            protocol/messenger_activity_center_test.go on lines 311..319

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

                            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

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

                                response, err = WaitOnMessengerResponse(
                                    alice,
                                    func(r *MessengerResponse) bool {
                                        return len(r.Messages()) == 1 && len(r.ActivityCenterNotifications()) == 1 &&
                                            r.Messages()[0].ID == r.ActivityCenterNotifications()[0].Message.ID &&
                            Severity: Major
                            Found in protocol/messenger_activity_center_test.go and 1 other location - About 1 hr to fix
                            protocol/messenger_activity_center_test.go on lines 496..504

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

                            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