broadcast txproposal 1 by 1
This commit is contained in:
parent
d8c3d08582
commit
5154dc7085
3 changed files with 53 additions and 34 deletions
|
|
@ -101,23 +101,21 @@ angular.module('copay.controllerUtils')
|
|||
};
|
||||
|
||||
root.updateBalance = function(cb) {
|
||||
|
||||
console.log('Updating balance...');
|
||||
$rootScope.balanceByAddr = {};
|
||||
var w = $rootScope.wallet;
|
||||
$rootScope.addrInfos = w.getAddressesInfo();
|
||||
if ($rootScope.addrInfos.length === 0) return;
|
||||
$rootScope.loading = true;
|
||||
w.getBalance(false, function(balance, balanceByAddr) {
|
||||
w.getBalance(function(balance, balanceByAddr, safeBalance) {
|
||||
$rootScope.loading = false;
|
||||
$rootScope.totalBalance = balance;
|
||||
$rootScope.balanceByAddr = balanceByAddr;
|
||||
$rootScope.selectedAddr = $rootScope.addrInfos[0].address.toString();
|
||||
$rootScope.loading = false;
|
||||
$rootScope.$digest();
|
||||
if (cb) cb();
|
||||
});
|
||||
w.getBalance(true, function(balance) {
|
||||
$rootScope.availableBalance = balance;
|
||||
$rootScope.loading = false;
|
||||
$rootScope.availableBalance = safeBalance;
|
||||
$rootScope.$digest();
|
||||
console.log('Done updating balance.'); //TODO
|
||||
if (cb) cb();
|
||||
});
|
||||
root.setSocketHandlers();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue