mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #466 from colkito/fix/tx-list-error
angularjs digest errors fixed
This commit is contained in:
commit
cb03424e7a
|
@ -489,9 +489,8 @@
|
|||
</div>
|
||||
<div class="large-12 columns">
|
||||
<h4>Last transactions</h4>
|
||||
<button ng-click="toogleLast()" ng-disabled="loading" loading="Updating">
|
||||
Show
|
||||
</button>
|
||||
<button ng-click="toogleLast()" ng-disabled="loading" loading="Updating" ng-hide="lastShowed && !loading">Show</button>
|
||||
<button ng-click="toogleLast()" ng-disabled="loading" loading="Updating" ng-show="lastShowed && !loading">Hide</button>
|
||||
<div class="btransactions" ng-if="lastShowed">
|
||||
<div ng-if="!blockchain_txs[0].txid && !loading">
|
||||
No transactions yet.
|
||||
|
@ -511,7 +510,7 @@
|
|||
</div>
|
||||
<div class="tx-copayers">
|
||||
<div class="large-5 columns">
|
||||
<div ng-repeat="vin in btx.vin | groupByAddress">
|
||||
<div ng-repeat="vin in btx.vin track by $index | groupByAddress">
|
||||
<p class="left text-gray size-12"> {{vin.addr}} </p>
|
||||
<small class="right">{{vin.value}}</small>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copay.transactions').controller('TransactionsController',
|
||||
function($scope, $rootScope, controllerUtils) {
|
||||
function($scope, $rootScope, $timeout, controllerUtils) {
|
||||
|
||||
$scope.title = 'Transactions';
|
||||
$scope.loading = false;
|
||||
|
@ -31,21 +31,21 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
};
|
||||
|
||||
$scope.toogleLast = function () {
|
||||
console.log('[toogleLast]');
|
||||
$scope.loading=true;
|
||||
$scope.loading = true;
|
||||
$scope.lastShowed = !$scope.lastShowed;
|
||||
if ($scope.lastShowed) {
|
||||
$scope.getTransactions(function(txs){
|
||||
$scope.loading=false;
|
||||
$timeout(function() {
|
||||
$scope.loading = false;
|
||||
$scope.blockchain_txs = txs;
|
||||
$rootScope.$digest();
|
||||
$scope.$digest();
|
||||
}, 10);
|
||||
});
|
||||
}
|
||||
else {
|
||||
setTimeout(function(){
|
||||
$scope.loading=false;
|
||||
} else {
|
||||
$timeout(function(){
|
||||
$scope.loading = false;
|
||||
$rootScope.$digest();
|
||||
});
|
||||
}, 10);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -90,7 +90,6 @@ angular.module('copay.transactions').controller('TransactionsController',
|
|||
$scope.getTransactions = function(cb) {
|
||||
var w =$rootScope.wallet;
|
||||
if (w) {
|
||||
|
||||
console.log('### Querying last transactions...'); //TODO
|
||||
var addresses = w.getAddressesStr();
|
||||
if (addresses.length > 0) {
|
||||
|
|
|
@ -14,15 +14,22 @@ angular.module('copay.filters', [])
|
|||
return dic;
|
||||
}
|
||||
|
||||
var dic = inputs.reduce(reduce, {});
|
||||
var dic;
|
||||
if (inputs) {
|
||||
dic = inputs.reduce(reduce, {});
|
||||
return Object.keys(dic).map(function(key) {
|
||||
return { addr: key, value: dic[key] };
|
||||
});
|
||||
}
|
||||
};
|
||||
})
|
||||
.filter('paged', function() {
|
||||
return function(elements) {
|
||||
if (elements) {
|
||||
return elements.filter(Boolean);
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
})
|
||||
.filter('limitAddress', function() {
|
||||
|
|
Loading…
Reference in New Issue