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); });