From 86a368dddfe51d61d74895b2590a6101c6992f43 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Sat, 20 Feb 2016 03:50:25 -0800 Subject: [PATCH] fix wallet scan. --- lib/bcoin/wallet.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/bcoin/wallet.js b/lib/bcoin/wallet.js index d826ac0e..e3cf7d92 100644 --- a/lib/bcoin/wallet.js +++ b/lib/bcoin/wallet.js @@ -671,11 +671,11 @@ Wallet.prototype.scan = function scan(txByAddress, callback) { if (err) return callback(err); - if (depth.changeDepth >= this.changeDepth) - this.setChangeDepth(depth.changeDepth + 1); + if (depth.changeDepth >= self.changeDepth) + self.setChangeDepth(depth.changeDepth + 1); - if (depth.receiveDepth >= this.receiveDepth) - this.setReceiveDepth(depth.receiveDepth + 1); + if (depth.receiveDepth >= self.receiveDepth) + self.setReceiveDepth(depth.receiveDepth + 1); return callback(null, self); });