Browse Source

remove nonCompliant argument from deriveChild, fix travis file

patch-2
Gabe Gattis 8 years ago
parent
commit
a963632287
No known key found for this signature in database GPG Key ID: 441430987182732C
  1. 6
      .travis.yml
  2. 17
      lib/hdprivatekey.js

6
.travis.yml

@ -1,9 +1,9 @@
language: node_js
sudo: false
node_js:
'0.10'
'0.12'
'2.0.0'
- '0.10'
- '0.12'
- '2.0.0'
- '4'
before_install:
- npm install -g bower

17
lib/hdprivatekey.js

@ -184,14 +184,12 @@ HDPrivateKey.prototype.derive = function(arg, hardened) {
*
* @param {string|number} arg
* @param {boolean?} hardened
* @param {boolean?} nonCompliant - This should not be used and only for backwards compatibility
*
*/
HDPrivateKey.prototype.deriveChild = function(arg, hardened, nonCompliant) {
HDPrivateKey.prototype.deriveChild = function(arg, hardened) {
if (_.isNumber(arg)) {
return this._deriveWithNumber(arg, hardened, nonCompliant);
return this._deriveWithNumber(arg, hardened);
} else if (_.isString(arg)) {
return this._deriveFromString(arg, nonCompliant);
return this._deriveFromString(arg);
} else {
throw new hdErrors.InvalidDerivationArgument(arg);
}
@ -214,8 +212,13 @@ HDPrivateKey.prototype.deriveChild = function(arg, hardened, nonCompliant) {
* @param {boolean?} hardened
*/
HDPrivateKey.prototype.deriveNonCompliantChild = function(arg, hardened) {
var derived = this.deriveChild(arg, hardened, true);
return derived;
if (_.isNumber(arg)) {
return this._deriveWithNumber(arg, hardened, true);
} else if (_.isString(arg)) {
return this._deriveFromString(arg, true);
} else {
throw new hdErrors.InvalidDerivationArgument(arg);
}
};
HDPrivateKey.prototype._deriveWithNumber = function(index, hardened, nonCompliant) {

Loading…
Cancel
Save