darkwallet/darkwallet

View on GitHub
src/js/util/stealth.js

Summary

Maintainability
A
2 hrs
Test Coverage

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

Stealth.addStealth = function(recipient, newTx, addressVersion, nonceVersion, ephemKeyBytes, initialNonce) {
    if (nonceVersion === undefined) { nonceVersion = Stealth.nonceVersion; };
    if (addressVersion === undefined) { addressVersion = Bitcoin.networks.bitcoin.pubKeyHash; };
    var outHash, ephemKey, pubKey;
    var stealthAddress = Stealth.parseAddress(recipient);
Severity: Minor
Found in src/js/util/stealth.js - About 1 hr to fix

    Function addStealth has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    Stealth.addStealth = function(recipient, newTx, addressVersion, nonceVersion, ephemKeyBytes, initialNonce) {
    Severity: Minor
    Found in src/js/util/stealth.js - About 45 mins to fix

      Function initiateStealth has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      Stealth.initiateStealth = function(scanKeyBytes, spendKeyBytes, version, ephemKeyBytes, newStealth) {
      Severity: Minor
      Found in src/js/util/stealth.js - About 35 mins to fix

        There are no issues that match your filters.

        Category
        Status