show status balance
This commit is contained in:
parent
5656caaa5a
commit
e3076d18ab
4 changed files with 90 additions and 88 deletions
|
|
@ -93,11 +93,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
|||
i = 0;
|
||||
|
||||
lodash.each(wallets, function(wallet) {
|
||||
walletService.updateStatus(wallet, {}, function(err) {
|
||||
var status = wallet.status;
|
||||
walletService.getStatus(wallet, {}, function(err, status) {
|
||||
if (err) {
|
||||
console.log('[tab-home.js.35:err:]',$log.error(err)); //TODO
|
||||
return;
|
||||
console.log('[tab-home.js.35:err:]', $log.error(err)); //TODO
|
||||
return;
|
||||
} // TODO
|
||||
if (status.pendingTxps && status.pendingTxps[0]) {
|
||||
txps = txps.concat(status.pendingTxps);
|
||||
|
|
|
|||
|
|
@ -61,12 +61,21 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
$scope.updateAll = function() {
|
||||
$scope.update();
|
||||
}
|
||||
|
||||
$scope.update = function() {
|
||||
walletService.updateStatus(wallet, {
|
||||
force: true
|
||||
}, function(err, status) {
|
||||
if (err) {} // TODO
|
||||
});
|
||||
$scope.updating = true;
|
||||
$timeout(function() {
|
||||
walletService.getStatus(wallet, {
|
||||
force: true
|
||||
}, function(err, status) {
|
||||
if (err) {} // TODO
|
||||
$scope.status = status;
|
||||
$scope.updating = false;
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
$scope.hideToggle = function() {
|
||||
|
|
@ -85,9 +94,15 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
$scope.wallet = wallet;
|
||||
|
||||
if (wallet) {
|
||||
walletService.updateStatus(wallet, {}, function(err, status) {
|
||||
console.log(status);
|
||||
walletService.getStatus(wallet, {}, function(err, status) {
|
||||
console.log('*** [walletDetails.js ln89] status:', status); // TODO
|
||||
if (err) {} // TODO
|
||||
$scope.status = status;
|
||||
});
|
||||
walletService.getHistory(wallet, {}, function(err, txHistory) {
|
||||
console.log('*** [walletDetails.js ln93] txHistory:', txHistory); // TODO
|
||||
if (err) {} // TODO
|
||||
$scope.txHistory = txHistory;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue