Merge pull request #2876 from cmgustavo/bug/scan-all-addresses-02

Replaces *for* by *lodash* functions
This commit is contained in:
Matias Alejo Garcia 2015-06-10 15:05:36 -03:00
commit e194bb6c7e

View file

@ -771,12 +771,11 @@ angular.module('copayApp.controllers').controller('indexController', function($r
storageService.getCleanAndScanAddresses(function(err, val) { storageService.getCleanAndScanAddresses(function(err, val) {
if (val) { if (val) {
$log.debug('Clear last address cache and Scan'); $log.debug('Clear last address cache and Scan');
var wallets = profileService.walletClients; lodash.each(lodash.keys(profileService.walletClients), function(walletId) {
for (var walletId in wallets) {
storageService.clearLastAddress(walletId, function(err) { storageService.clearLastAddress(walletId, function(err) {
self.startScan(walletId); self.startScan(walletId);
}); });
} });
storageService.removeCleanAndScanAddresses(function() {}); storageService.removeCleanAndScanAddresses(function() {});
} }
}); });