darkwallet/darkwallet

View on GitHub

Showing 511 of 903 total issues

Function 37 has 118 lines of code (exceeds 25 allowed). Consider refactoring.
Open

},{}],37:[function(require,module,exports){
module.exports = {
  // push value
  OP_FALSE     : 0,
  OP_0         : 0,
Severity: Major
Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

    Function StealthService has 117 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      function StealthService(core) {
        var self = this;
        this.name = 'stealth';
    
        // Worker for processing stealth
    Severity: Major
    Found in src/js/backend/services/stealth.js - About 4 hrs to fix

      Function 22 has 115 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      },{"./core":3,"./hmac":8,"./sha1":26}],22:[function(require,module,exports){
      ;(function (root, factory, undef) {
          if (typeof exports === "object") {
              // CommonJS
              module.exports = exports = factory(require("./core"), require("./enc-base64"), require("./md5"), require("./evpkdf"), require("./cipher-core"));
      Severity: Major
      Found in src/vendors/crypto-js/cryptojs.js - About 4 hrs to fix

        Function 36 has 113 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        },{"./bufferutils":28,"./crypto":29,"./ecdsa":30,"./ecpubkey":32,"./ecsignature":33,"./networks":36,"bigi":3,"buffer":46,"ecurve":24}],36:[function(require,module,exports){
        // https://en.bitcoin.it/wiki/List_of_address_prefixes
        // Dogecoin BIP32 is a proposed standard: https://bitcointalk.org/index.php?topic=409731
        
        var networks = {
        Severity: Major
        Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

          Function findFinderPattern has 108 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              this.findFinderPattern = function(image){
                  var tryHarder = false;
                  this.image=image;
                  var maxI = qrcode.height;
                  var maxJ = qrcode.width;
          Severity: Major
          Found in src/vendors/jsqrcode/jsqrcode.js - About 4 hrs to fix

            Function link has 106 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                  link: function(scope, element, attrs) {
                    var iconSize = scope.iconSize || 32;
                    var canvasSize = iconSize > 32 ? 64 : 32;
                    
                    var canvas = $window.document.createElement('canvas');
            Severity: Major
            Found in src/js/frontend/directives/face.js - About 4 hrs to fix

              Function 18 has 106 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"util":68}],18:[function(require,module,exports){
              
              /**
               * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined
               * in FIPS 180-2
              Severity: Major
              Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

                Function exports has 103 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                module.exports = function (Buffer, Hash) {
                
                  var K = [
                      0x428A2F98, 0x71374491, 0xB5C0FBCF, 0xE9B5DBA5,
                      0x3956C25B, 0x59F111F1, 0x923F82A4, 0xAB1C5ED5,
                Severity: Major
                Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

                  Function 30 has 101 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  },{"crypto":10}],30:[function(require,module,exports){
                  (function (Buffer){
                  var assert = require('assert')
                  var crypto = require('./crypto')
                  var enforceType = require('./types')
                  Severity: Major
                  Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

                    Function _update has 100 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Sha512.prototype._update = function(M) {
                    
                        var W = this._w
                        var a, b, c, d, e, f, g, h
                        var al, bl, cl, dl, el, fl, gl, hl
                    Severity: Major
                    Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 4 hrs to fix

                      Function 38 has 98 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      },{}],38:[function(require,module,exports){
                      (function (Buffer){
                      var assert = require('assert')
                      var bufferutils = require('./bufferutils')
                      var crypto = require('./crypto')
                      Severity: Major
                      Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

                        Function getMiddleBrightnessPerArea has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
                        Open

                        qrcode.getMiddleBrightnessPerArea=function(image)
                        {
                            var numSqrtArea = 4;
                            //obtain middle brightness((min + max) / 2) per area
                            var areaWidth = Math.floor(qrcode.width / numSqrtArea);
                        Severity: Minor
                        Found in src/vendors/jsqrcode/jsqrcode.js - About 3 hrs to fix

                        Cognitive Complexity

                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                        A method's cognitive complexity is based on a few simple rules:

                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                        • Code is considered more complex for each "break in the linear flow of the code"
                        • Code is considered more complex when "flow breaking structures are nested"

                        Further reading

                        Function Upgrade4To5 has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Upgrade4To5(store, identity, password) {
                            if (identity.store.get('old-mpk')) {
                                console.log("Double reseed?");
                                return false;
                            }
                        Severity: Major
                        Found in src/js/model/upgrade.js - About 3 hrs to fix

                          Function _doProcessBlock has 97 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      _doProcessBlock: function (M, offset) {
                                          // Swap endian
                                          for (var i = 0; i < 16; i++) {
                                              // Shortcuts
                                              var offset_i = offset + i;
                          Severity: Major
                          Found in src/vendors/crypto-js/cryptojs.js - About 3 hrs to fix

                            Function receiveMessage has 95 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            multiParty.receiveMessage = function(sender, myName, message) {
                                try {
                                    message = JSON.parse(message);
                                }
                                catch(err) {
                            Severity: Major
                            Found in src/js/util/multiParty.js - About 3 hrs to fix

                              Function queue has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  async.queue = function (worker, concurrency) {
                                      if (concurrency === undefined) {
                                          concurrency = 1;
                                      }
                                      function _insert(q, data, pos, callback) {
                              Severity: Major
                              Found in src/vendors/async/lib/async.js - About 3 hrs to fix

                                Function callPlugin has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                            callPlugin: function () {
                                                var map = this.map,
                                                    id = map.id,
                                                    //Map already normalized the prefix.
                                                    pluginMap = makeModuleMap(map.prefix);
                                Severity: Major
                                Found in src/vendors/requirejs/require.js - About 3 hrs to fix

                                  Function TzDate has 93 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  angular.mock.TzDate = function (offset, timestamp) {
                                    var self = new Date(0);
                                    if (angular.isString(timestamp)) {
                                      var tsStr = timestamp;
                                  
                                  
                                  Severity: Major
                                  Found in src/vendors/angular-mocks/angular-mocks.js - About 3 hrs to fix

                                    Function 47 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    },{"base64-js":47,"ieee754":48,"is-array":49}],47:[function(require,module,exports){
                                    var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
                                    
                                    ;(function (exports) {
                                        'use strict';
                                    Severity: Major
                                    Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix

                                      Function 33 has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      },{"./address":27,"./crypto":29,"./ecdsa":30,"./networks":36,"./types":42,"buffer":46,"ecurve":24}],33:[function(require,module,exports){
                                      (function (Buffer){
                                      var assert = require('assert')
                                      var enforceType = require('./types')
                                      
                                      
                                      Severity: Major
                                      Found in src/vendors/bitcoinjs-lib/bitcoinjs.js - About 3 hrs to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language