Replaces directive by an object of addressbook on walletDetails

This commit is contained in:
Gustavo Maximiliano Cortez 2016-10-21 11:58:33 -03:00
commit 53977ac00e
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
3 changed files with 22 additions and 27 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService) {
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, profileService, lodash, configService, gettextCatalog, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService) {
var HISTORY_SHOW_LIMIT = 10;
var currentTxHistoryPage = 0;
@ -184,6 +184,11 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
$scope.wallet = profileService.getWallet(data.stateParams.walletId);
$scope.requiresMultipleSignatures = $scope.wallet.credentials.m > 1;
addressbookService.list(function(err, ab) {
if (err) $log.error(err);
$scope.addressbook = ab || {};
});
$scope.updateAll();
listeners = [