Move pagination of transaction proposals to the backend

This commit is contained in:
Yemel Jardi 2014-05-20 14:34:55 -07:00
commit 15fc035ba9
4 changed files with 16 additions and 11 deletions

View file

@ -13,7 +13,12 @@ angular.module('copay.transactions').controller('TransactionsController',
$scope.update = function () {
$scope.loading = false;
controllerUtils.updateTxs({onlyPending:$scope.onlyPending});
var from = ($scope.txpCurrentPage-1) * $scope.txpItemsPerPage;
var opts = {
onlyPending: $scope.onlyPending,
skip: !$scope.onlyPending ? [from, from + $scope.txpItemsPerPage] : null
};
controllerUtils.updateTxs(opts);
$rootScope.$digest();
};