|
|
@ -544,8 +544,7 @@ WalletService.prototype.createAddress = function(opts, cb) { |
|
|
|
self._runLocked(cb, function(cb) { |
|
|
|
self.getWallet({}, function(err, wallet) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!wallet.isComplete()) |
|
|
|
return cb(new ClientError('Wallet is not complete')); |
|
|
|
if (!wallet.isComplete()) return cb(Errors.WALLET_NOT_COMPLETE); |
|
|
|
|
|
|
|
var address = wallet.createAddress(false); |
|
|
|
|
|
|
@ -977,8 +976,7 @@ WalletService.prototype.createTx = function(opts, cb) { |
|
|
|
self._runLocked(cb, function(cb) { |
|
|
|
self.getWallet({}, function(err, wallet) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!wallet.isComplete()) |
|
|
|
return cb(new ClientError('Wallet is not complete')); |
|
|
|
if (!wallet.isComplete()) return cb(Errors.WALLET_NOT_COMPLETE); |
|
|
|
|
|
|
|
var copayer = wallet.getCopayer(self.copayerId); |
|
|
|
var hash; |
|
|
@ -1665,7 +1663,7 @@ WalletService.prototype.scan = function(opts, cb) { |
|
|
|
self._runLocked(cb, function(cb) { |
|
|
|
self.getWallet({}, function(err, wallet) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!wallet.isComplete()) return cb(new ClientError('Wallet is not complete')); |
|
|
|
if (!wallet.isComplete()) return cb(Errors.WALLET_NOT_COMPLETE); |
|
|
|
|
|
|
|
wallet.scanStatus = 'running'; |
|
|
|
self.storage.storeWallet(wallet, function(err) { |
|
|
@ -1724,7 +1722,7 @@ WalletService.prototype.startScan = function(opts, cb) { |
|
|
|
|
|
|
|
self.getWallet({}, function(err, wallet) { |
|
|
|
if (err) return cb(err); |
|
|
|
if (!wallet.isComplete()) return cb(new ClientError('Wallet is not complete')); |
|
|
|
if (!wallet.isComplete()) return cb(Errors.WALLET_NOT_COMPLETE); |
|
|
|
|
|
|
|
setTimeout(function() { |
|
|
|
self.scan(opts, scanFinished); |
|
|
|