optimizing address page
This commit is contained in:
parent
1a34f53a57
commit
4acb32c3d8
8 changed files with 52 additions and 44 deletions
|
|
@ -3,21 +3,22 @@
|
|||
angular.module('copay.addresses').controller('AddressesController',
|
||||
function($scope, $rootScope, controllerUtils) {
|
||||
$scope.title = 'Home';
|
||||
$scope.oneAtATime = true;
|
||||
$scope.addrBalance = {};
|
||||
|
||||
var w = $rootScope.wallet;
|
||||
|
||||
var _updateBalance = function () {
|
||||
var _updateBalance = function() {
|
||||
$scope.addrs = w.getAddressesStr(true);
|
||||
controllerUtils.setSocketHandlers();
|
||||
w.getBalance(true, function (balance, balanceByAddr, isMain) {
|
||||
if (balanceByAddr && Object.keys(balanceByAddr).length) {
|
||||
w.getBalance(true, function(balance, balanceByAddr, isMain) {
|
||||
if (balanceByAddr && Object.keys(balanceByAddr).length) {
|
||||
$rootScope.balanceByAddr = balanceByAddr;
|
||||
$scope.isMain = isMain;
|
||||
$scope.addrs = Object.keys(balanceByAddr);
|
||||
$scope.addrs = Object.keys(balanceByAddr);
|
||||
$scope.selectedAddr = $scope.addrs[0];
|
||||
$scope.loading = false;
|
||||
$rootScope.$digest();
|
||||
alert('digest');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -26,6 +27,7 @@ angular.module('copay.addresses').controller('AddressesController',
|
|||
$scope.loading = true;
|
||||
w.generateAddress();
|
||||
_updateBalance();
|
||||
alert('new address');
|
||||
};
|
||||
|
||||
$scope.selectAddr = function(addr) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue