fix scanning status
This commit is contained in:
parent
8c3397e698
commit
1ac368c67d
4 changed files with 21 additions and 13 deletions
|
|
@ -224,7 +224,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
wallet.error = null;
|
||||
wallet.status = status;
|
||||
|
||||
wallet.updating = status && status.wallet && status.wallet.scanStatus == 'running';
|
||||
// TODO service refactor? not in profile service
|
||||
profileService.setLastKnownBalance(wallet.id, wallet.status.totalBalanceStr, function() {});
|
||||
}
|
||||
|
|
@ -243,7 +242,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
return;
|
||||
}
|
||||
wallet.status = status;
|
||||
wallet.updating = status && status.wallet && status.wallet.scanStatus == 'running';
|
||||
updateTxps();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -305,6 +305,8 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
|
||||
cacheStatus(status);
|
||||
|
||||
wallet.scanning = status.wallet && status.wallet.scanStatus == 'running';
|
||||
|
||||
return cb(null, status);
|
||||
});
|
||||
};
|
||||
|
|
@ -818,13 +820,10 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim
|
|||
$log.debug('Scanning wallet ' + wallet.id);
|
||||
if (!wallet.isComplete()) return;
|
||||
|
||||
wallet.updating = true;
|
||||
ongoingProcess.set('scanning', true);
|
||||
wallet.scanning = true;
|
||||
wallet.startScan({
|
||||
includeCopayerBranches: true,
|
||||
}, function(err) {
|
||||
wallet.updating = false;
|
||||
ongoingProcess.set('scanning', false);
|
||||
return cb(err);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue