From 63410707da631f7afbbf8fa102cd3d0529378cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 22 Jul 2016 12:21:07 -0300 Subject: [PATCH] hide incomplete wallets afeter click on a bitcoin uri --- public/views/paymentUri.html | 12 ++++++------ src/js/controllers/paymentUri.js | 12 ++++++++++-- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/public/views/paymentUri.html b/public/views/paymentUri.html index 73c553a5a..204a58441 100644 --- a/public/views/paymentUri.html +++ b/public/views/paymentUri.html @@ -1,5 +1,5 @@ -
@@ -9,7 +9,7 @@

Bitcoin URI is NOT valid!

-
+

Make a payment to

Address: {{payment.uri.address.toString()}}
@@ -31,14 +31,14 @@ diff --git a/src/js/controllers/paymentUri.js b/src/js/controllers/paymentUri.js index deaf152a0..bfd6f9f13 100644 --- a/src/js/controllers/paymentUri.js +++ b/src/js/controllers/paymentUri.js @@ -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) {