Merge pull request #3567 from gabrielbazan7/fix/goWalletHome

fix go walletHome problem
This commit is contained in:
Gustavo Maximiliano Cortez 2015-12-02 11:59:31 -03:00
commit f160c87a07

View file

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