From 2d8274b46ef17045ec8e9812f6f90853def07565 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 16 Jul 2016 14:56:27 -0700 Subject: [PATCH] lint. --- lib/bcoin/hd.js | 1 - lib/bcoin/http/server.js | 4 +++- lib/bcoin/http/wallet.js | 1 + lib/bcoin/logger.js | 2 -- lib/bcoin/wallet.js | 2 -- lib/bcoin/walletdb.js | 6 +----- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/lib/bcoin/hd.js b/lib/bcoin/hd.js index 8d6e97c5..38b45923 100644 --- a/lib/bcoin/hd.js +++ b/lib/bcoin/hd.js @@ -79,7 +79,6 @@ 'use strict'; var bcoin = require('./env'); -var bn = require('bn.js'); var utils = require('./utils'); var ec = require('./ec'); var assert = utils.assert; diff --git a/lib/bcoin/http/server.js b/lib/bcoin/http/server.js index b9ed1a4e..fcdf08ef 100644 --- a/lib/bcoin/http/server.js +++ b/lib/bcoin/http/server.js @@ -7,6 +7,8 @@ 'use strict'; +/* jshint -W069 */ + var bcoin = require('../env'); var EventEmitter = require('events').EventEmitter; var constants = bcoin.protocol.constants; @@ -506,7 +508,7 @@ HTTPServer.prototype._init = function _init() { var options = req.options; var old = options.old; var new_ = options.passphrase; - self.walletdb.setPassphrase(id, old, _new, function(err) { + self.walletdb.setPassphrase(id, old, new_, function(err) { if (err) return next(err); diff --git a/lib/bcoin/http/wallet.js b/lib/bcoin/http/wallet.js index 4f92daa1..d00ad97b 100644 --- a/lib/bcoin/http/wallet.js +++ b/lib/bcoin/http/wallet.js @@ -9,6 +9,7 @@ var bcoin = require('../env'); var EventEmitter = require('events').EventEmitter; +var assert = require('assert'); var utils = require('../utils'); var http = require('./'); diff --git a/lib/bcoin/logger.js b/lib/bcoin/logger.js index fa6c62d1..c2bfda3d 100644 --- a/lib/bcoin/logger.js +++ b/lib/bcoin/logger.js @@ -203,8 +203,6 @@ Logger.prototype.debug = function debug() { */ Logger.prototype.log = function log(level, args) { - var prefix, color, msg; - if (this.closed) return; diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index 3626df14..aa916eea 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -1935,7 +1935,6 @@ Account.prototype.open = function open(callback) { */ Account.prototype.pushKey = function pushKey(key) { - var result = false; var index = -1; var i; @@ -1983,7 +1982,6 @@ Account.prototype.pushKey = function pushKey(key) { */ Account.prototype.spliceKey = function spliceKey(key) { - var result = false; var index = -1; var i; diff --git a/lib/bcoin/walletdb.js b/lib/bcoin/walletdb.js index feb4bdbb..08c0efa1 100644 --- a/lib/bcoin/walletdb.js +++ b/lib/bcoin/walletdb.js @@ -477,7 +477,7 @@ WalletDB.prototype.hasListener = function hasListener(id, event) { WalletDB.prototype.get = function get(id, callback) { var self = this; - var unlock, watcher, wallet; + var unlock, watcher; unlock = this._lock(id, get, [id, callback]); @@ -576,9 +576,6 @@ WalletDB.prototype.save = function save(wallet) { */ WalletDB.prototype.auth = function auth(id, token, callback) { - var self = this; - var wallet; - this._get(id, function(err, wallet) { if (err) return callback(err); @@ -704,7 +701,6 @@ WalletDB.prototype.ensure = function ensure(options, callback) { WalletDB.prototype.getAccount = function getAccount(id, name, callback) { var self = this; - var account; this.getAccountIndex(id, name, function(err, index) { if (err)