Skip to content

Commit

Permalink
Quckfix of disappearing Script in address.js
Browse files Browse the repository at this point in the history
  • Loading branch information
shumkov authored Jul 16, 2019
1 parent cad826f commit dad15d0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions lib/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ function Address(data, network, type) {
*/
Address.prototype._classifyArguments = function(data, network, type) {
/* jshint maxcomplexity: 10 */

// Fix for the circular dependency with the Script class. Normal fix won't work if
// the project uses Address class and the dependency that uses Address class as well.
// Ideally, we need to get rid of this dependency, but it will break the API.
Script = require('./script/script');

// transform and validate input data
if ((data instanceof Buffer || data instanceof Uint8Array) && data.length === 20) {
return Address._transformHash(data);
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dashevo/dashcore-lib",
"version": "0.17.7",
"version": "0.17.8",
"description": "A pure and powerful JavaScript Dash library.",
"author": "Dash Core Group, Inc. <dev@dash.org>",
"main": "index.js",
Expand Down

0 comments on commit dad15d0

Please sign in to comment.