@dashevo/dashcore-lib
Advanced tools
Comparing version 0.20.8 to 0.20.9
@@ -222,3 +222,3 @@ const _ = require('lodash'); | ||
simplifiedMNListDiff.mnList = obj.mnList.map( | ||
(entry) => new SimplifiedMNListEntry({ ...entry, nVersion: obj.nVersion }, validNetwork) | ||
(entry) => new SimplifiedMNListEntry(entry, validNetwork) | ||
); | ||
@@ -300,5 +300,5 @@ simplifiedMNListDiff.deletedQuorums = obj.deletedQuorums.slice(); | ||
SimplifiedMNListDiff.prototype.copy = function copy() { | ||
return SimplifiedMNListDiff.fromObject(_.clone(this.toObject()), this.network); | ||
return _.cloneDeep(this); | ||
}; | ||
module.exports = SimplifiedMNListDiff; |
@@ -151,8 +151,10 @@ const _ = require('lodash'); | ||
if (typeof this.nType === 'number') { | ||
bufferWriter.writeUInt16LE(this.nType); | ||
if (this.nVersion === 2) { | ||
if (typeof this.nType === 'number') { | ||
bufferWriter.writeUInt16LE(this.nType); | ||
if (this.nType === MASTERNODE_TYPE_HP) { | ||
bufferWriter.writeUInt16LE(this.platformHTTPPort); | ||
bufferWriter.write(Buffer.from(this.platformNodeID, 'hex').reverse()); | ||
if (this.nType === MASTERNODE_TYPE_HP) { | ||
bufferWriter.writeUInt16LE(this.platformHTTPPort); | ||
bufferWriter.write(Buffer.from(this.platformNodeID, 'hex').reverse()); | ||
} | ||
} | ||
@@ -243,5 +245,8 @@ } | ||
isValid: this.isValid, | ||
nVersion: this.nVersion, | ||
}; | ||
if (typeof this.nVersion === 'number') { | ||
result.nVersion = this.nVersion; | ||
} | ||
if (typeof this.nType === 'number') { | ||
@@ -267,6 +272,2 @@ result.nType = this.nType; | ||
if (typeof this.nVersion === 'number') { | ||
result.nVersion = this.nVersion; | ||
} | ||
return result; | ||
@@ -308,5 +309,5 @@ }; | ||
SimplifiedMNListEntry.prototype.copy = function copy() { | ||
return SimplifiedMNListEntry.fromObject(_.clone(this.toObject()), this.network); | ||
return _.cloneDeep(this); | ||
}; | ||
module.exports = SimplifiedMNListEntry; |
{ | ||
"name": "@dashevo/dashcore-lib", | ||
"version": "0.20.8", | ||
"version": "0.20.9", | ||
"description": "A pure and powerful JavaScript Dash library.", | ||
@@ -5,0 +5,0 @@ "author": "Dash Core Group, Inc. <dev@dash.org>", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37819
2753327