From a1b4fd7ff84939d4a9cc006faaf60287a5b39bbb Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Wed, 15 Jan 2014 10:13:46 -0300 Subject: [PATCH] remove some jslint errors from backend --- app/models/Address.js | 12 ++++++------ app/models/Block.js | 1 - 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/app/models/Address.js b/app/models/Address.js index dd6da83a..05d1a783 100644 --- a/app/models/Address.js +++ b/app/models/Address.js @@ -26,32 +26,32 @@ function spec() { } - Object.defineProperty(this, "totalSent", { + Object.defineProperty(this, 'totalSent', { get: function() { return parseFloat(this.totalSentSat) / parseFloat(BitcoreUtil.COIN); }, set: function(i) { - totalSentSat = i * BitcoreUtil.COIN; + this.totalSentSat = i * BitcoreUtil.COIN; }, enumerable: 1, }); - Object.defineProperty(this, "balance", { + Object.defineProperty(this, 'balance', { get: function() { return parseFloat(this.balanceSat) / parseFloat(BitcoreUtil.COIN); }, set: function(i) { - balance = i * BitcoreUtil.COIN; + this.balance = i * BitcoreUtil.COIN; }, enumerable: 1, }); - Object.defineProperty(this, "totalReceived", { + Object.defineProperty(this, 'totalReceived', { get: function() { return parseFloat(this.totalReceivedSat) / parseFloat(BitcoreUtil.COIN); }, set: function(i) { - totalReceived = i * BitcoreUtil.COIN; + this.totalReceived = i * BitcoreUtil.COIN; }, enumerable: 1, }); diff --git a/app/models/Block.js b/app/models/Block.js index 46af5907..34350968 100644 --- a/app/models/Block.js +++ b/app/models/Block.js @@ -5,7 +5,6 @@ */ var mongoose = require('mongoose'), Schema = mongoose.Schema, - bignum = require('bignum'), RpcClient = require('bitcore/RpcClient').class(), util = require('bitcore/util/util'), BitcoreBlock= require('bitcore/Block').class(),