mirror of https://github.com/BTCPrivate/copay.git
Check re-scan when a new wallet focused
This commit is contained in:
parent
8ef15e5eae
commit
d5f21e1ee0
|
@ -625,21 +625,6 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
storageService.setCleanAndScanAddresses(function() {});
|
storageService.setCleanAndScanAddresses(function() {});
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/CleanAndScanAddresses', function(event) {
|
|
||||||
storageService.getCleanAndScanAddresses(function(err, val) {
|
|
||||||
if (val) {
|
|
||||||
$log.debug('Clear last address cache and Scan');
|
|
||||||
var wallets = profileService.walletClients;
|
|
||||||
for (var walletId in wallets) {
|
|
||||||
storageService.clearLastAddress(walletId, function(err) {
|
|
||||||
self.startScan(walletId);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
storageService.removeCleanAndScanAddresses(function() {});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
$rootScope.$on('Local/WalletCompleted', function(event) {
|
$rootScope.$on('Local/WalletCompleted', function(event) {
|
||||||
self.setFocusedWallet();
|
self.setFocusedWallet();
|
||||||
go.walletHome();
|
go.walletHome();
|
||||||
|
@ -783,6 +768,19 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.setFocusedWallet();
|
self.setFocusedWallet();
|
||||||
self.updateTxHistory();
|
self.updateTxHistory();
|
||||||
go.walletHome();
|
go.walletHome();
|
||||||
|
storageService.getCleanAndScanAddresses(function(err, val) {
|
||||||
|
if (val) {
|
||||||
|
$log.debug('Clear last address cache and Scan');
|
||||||
|
var wallets = profileService.walletClients;
|
||||||
|
for (var walletId in wallets) {
|
||||||
|
storageService.clearLastAddress(walletId, function(err) {
|
||||||
|
self.startScan(walletId);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
storageService.removeCleanAndScanAddresses(function() {});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/SetTab', function(event, tab, reset) {
|
$rootScope.$on('Local/SetTab', function(event, tab, reset) {
|
||||||
|
|
|
@ -130,7 +130,6 @@ angular.module('copayApp.services')
|
||||||
storageService.getFocusedWalletId(function(err, focusedWalletId) {
|
storageService.getFocusedWalletId(function(err, focusedWalletId) {
|
||||||
if (err) return cb(err);
|
if (err) return cb(err);
|
||||||
root._setFocus(focusedWalletId, cb);
|
root._setFocus(focusedWalletId, cb);
|
||||||
$rootScope.$emit('Local/CleanAndScanAddresses');
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue