hide incomplete wallets afeter click on a bitcoin uri
This commit is contained in:
parent
394cff6291
commit
63410707da
2 changed files with 16 additions and 8 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<div
|
<div
|
||||||
class="topbar-container"
|
class="topbar-container"
|
||||||
ng-include="'views/includes/topbar.html'"
|
ng-include="'views/includes/topbar.html'"
|
||||||
ng-init="titleSection='Choose wallet'; closeToHome = true">
|
ng-init="titleSection='Choose wallet'; closeToHome = true">
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
<div class="panel text-center" ng-if="!payment.uri">
|
<div class="panel text-center" ng-if="!payment.uri">
|
||||||
<h1 translate>Bitcoin URI is NOT valid!</h1>
|
<h1 translate>Bitcoin URI is NOT valid!</h1>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="payment.uri" ng-init="wallets = payment.getWallets(payment.uri.network)">
|
<div ng-if="payment.uri" ng-init="payment.getWallets(payment.uri.network)">
|
||||||
<h1 translate>Make a payment to</h1>
|
<h1 translate>Make a payment to</h1>
|
||||||
<div class="panel size-14">
|
<div class="panel size-14">
|
||||||
<div class="ellipsis"><b translate>Address</b>: {{payment.uri.address.toString()}}</div>
|
<div class="ellipsis"><b translate>Address</b>: {{payment.uri.address.toString()}}</div>
|
||||||
|
|
@ -31,14 +31,14 @@
|
||||||
<ul class="no-bullet">
|
<ul class="no-bullet">
|
||||||
<li class="panel" ng-repeat="w in wallets">
|
<li class="panel" ng-repeat="w in wallets">
|
||||||
<a ng-click="payment.selectWallet(w.id)">
|
<a ng-click="payment.selectWallet(w.id)">
|
||||||
<div class="avatar-wallet"
|
<div class="avatar-wallet"
|
||||||
ng-style="{'background-color':w.color}">
|
ng-style="{'background-color':w.color}">
|
||||||
<i class="icon-wallet size-21"></i>
|
<i class="icon-wallet size-21"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ellipsis">{{w.name || w.id}}</div>
|
<div class="ellipsis">{{w.name || w.id}}</div>
|
||||||
<div class="size-12">{{w.m}} of {{w.n}}
|
<div class="size-12">{{w.m}} of {{w.n}}
|
||||||
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
<span ng-show="w.network=='testnet'">[Testnet]</span>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
angular.module('copayApp.controllers').controller('paymentUriController',
|
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) {
|
function strip(number) {
|
||||||
return (parseFloat(number.toPrecision(12)));
|
return (parseFloat(number.toPrecision(12)));
|
||||||
};
|
};
|
||||||
|
|
@ -33,7 +33,15 @@ angular.module('copayApp.controllers').controller('paymentUriController',
|
||||||
};
|
};
|
||||||
|
|
||||||
this.getWallets = function(network) {
|
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) {
|
this.selectWallet = function(wid) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue