fix go walletHome problem

This commit is contained in:
Gabriel Bazán 2015-12-02 11:29:59 -03:00
commit d2c2ec3edd

View file

@ -1348,14 +1348,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
self.updateTxHistory(); self.updateTxHistory();
storageService.getProfile(function(err, profile) { storageService.getProfile(function(err, profile) {
if (profile && profile.agreeDisclaimer) go.walletHome(); if (profile && profile.agreeDisclaimer) go.walletHome();
storageService.getCleanAndScanAddresses(function(err, walletId) {
if (walletId && profileService.walletClients[walletId]) { //compatible
$log.debug('Clear last address cache and Scan ', walletId); storageService.getCopayDisclaimerFlag(function(err, val) {
addressService.expireAddress(walletId, function(err) { if (val) go.walletHome();
self.startScan(walletId); storageService.getCleanAndScanAddresses(function(err, walletId) {
}); if (walletId && profileService.walletClients[walletId]) {
storageService.removeCleanAndScanAddresses(function() {}); $log.debug('Clear last address cache and Scan ', walletId);
} addressService.expireAddress(walletId, function(err) {
self.startScan(walletId);
});
storageService.removeCleanAndScanAddresses(function() {});
}
});
}); });
}); });
}); });