hide incomplete wallets afeter click on a bitcoin uri

This commit is contained in:
Gabriel Bazán 2016-07-22 12:21:07 -03:00
commit 63410707da
2 changed files with 16 additions and 8 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('paymentUriController',
function($rootScope, $stateParams, $location, $timeout, profileService, configService, lodash, bitcore, go) {
function($rootScope, $scope, $stateParams, $location, $timeout, profileService, configService, lodash, bitcore, go) {
function strip(number) {
return (parseFloat(number.toPrecision(12)));
};
@ -33,7 +33,15 @@ angular.module('copayApp.controllers').controller('paymentUriController',
};
this.getWallets = function(network) {
return profileService.getWallets(network);
$scope.wallets = [];
lodash.forEach(profileService.getWallets(network), function(w) {
var client = profileService.getClient(w.id);
profileService.isReady(client, function(err) {
if (err) return;
$scope.wallets.push(w);
})
});
};
this.selectWallet = function(wid) {