From e3afce6a9f77117e90fbc2fefe32613b92051cdb Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 3 Sep 2014 15:09:06 -0300 Subject: [PATCH] settings: Insight.js refactor 3 --- js/models/blockchain/Insight.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/models/blockchain/Insight.js b/js/models/blockchain/Insight.js index d71ea79a7..2e6c4116c 100644 --- a/js/models/blockchain/Insight.js +++ b/js/models/blockchain/Insight.js @@ -29,15 +29,15 @@ var preconditions = require('preconditions').singleton(); */ var Insight = function(opts) { - this.status = this.STATUS.DISCONNECTED; - this.subscribed = {}; - this.listeningBlocks = false; - preconditions.checkArgument(opts).shouldBeObject(opts) .checkArgument(opts.host) .checkArgument(opts.port) .checkArgument(opts.schema); + this.status = this.STATUS.DISCONNECTED; + this.subscribed = {}; + this.listeningBlocks = false; + this.url = opts.schema + '://' + opts.host + ':' + opts.port; this.opts = { 'reconnection': opts.reconnection || true,