mirror of https://github.com/BTCPrivate/copay.git
reverted to binding to live model objects
This commit is contained in:
parent
458f2b0638
commit
361b16d222
|
@ -1,19 +1,10 @@
|
|||
'use strict';
|
||||
|
||||
var watching;
|
||||
angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $filter, $modal, rateService, notification, txStatus, identityService) {
|
||||
|
||||
$scope.initHome = function() {
|
||||
$rootScope.title = 'Home';
|
||||
if (!watching) {
|
||||
watching = $rootScope.$watch('wallet', function (w) {
|
||||
$scope.isShared = w.isShared();
|
||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||
if ($scope.isShared)
|
||||
$scope.copayers = w.getRegisteredPeerIds();
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
$scope.openTxModal = function(tx) {
|
||||
var ModalInstanceCtrl = function($scope, $modalInstance) {
|
||||
|
|
|
@ -37,8 +37,8 @@
|
|||
<div class="row ">
|
||||
<div class="large-12 columns line-t m10t">
|
||||
<div class="right size-12">
|
||||
<span ng-if="!isShared">Personal Wallet</span>
|
||||
<span ng-if="isShared">
|
||||
<span ng-if="!$root.wallet.isShared()">Personal Wallet</span>
|
||||
<span ng-if="$root.wallet.isShared()">
|
||||
Multisignature wallet [{{$root.wallet.requiredCopayers}} of {{$root.wallet.totalCopayers}} ]
|
||||
</span>
|
||||
<span ng-if="$root.wallet.isTestnet()"> in TESTNET</span>
|
||||
|
@ -50,12 +50,12 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div ng-show="requiresMultipleSignatures">
|
||||
<div ng-show="$root.wallet.requiresMultipleSignatures()">
|
||||
<div class="row">
|
||||
<div class="large-12 columns">
|
||||
<div class="panel oh">
|
||||
<h2 class="line-b" translate>Spend proposals</h2>
|
||||
<div class="last-transactions pr" ng-repeat="tx in $root.wallet.pendingTxProposals | orderBy:'-createdTs'" ng-include="'views/includes/transaction.html'" ng-if="$root.wallet.pendingTxProposals[0]">
|
||||
<div class="last-transactions pr" ng-repeat="tx in $root.wallet.pendingTxProposals | orderBy:'-createdTs'" ng-include="'views/includes/transaction.html'" ng-if="$root.wallet.pendingTxProposals[0]">
|
||||
</div>
|
||||
|
||||
<div class="text-right size-12 line-t p10t" ng-show="$root.wallet.balanceInfo.lockedBalance && !$root.wallet.balanceInfo.updatingBalance">
|
||||
|
@ -73,7 +73,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" ng-if="isShared">
|
||||
<div class="row" ng-if="$root.wallet.isShared()">
|
||||
<!-- List of copayers -->
|
||||
<div class="large-12 columns">
|
||||
<div class="panel oh">
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div>
|
||||
<div class="copay-box" ng-repeat="copayer in copayers">
|
||||
<div class="copay-box" ng-repeat="copayer in $root.wallet.getRegisteredPeerIds()">
|
||||
<div class="photo-container">
|
||||
<img gravatar-src="'{{copayer.nick}}'" gravatar-size="35">
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue