diff --git a/js/controllers/history.js b/js/controllers/history.js
index ff8f41ebc..391dfd51c 100644
--- a/js/controllers/history.js
+++ b/js/controllers/history.js
@@ -14,9 +14,16 @@ angular.module('copayApp.controllers').controller('HistoryController',
$scope.currentPage = 1;
$scope.itemsPerPage = 10;
$scope.nbPages = 0;
+ $scope.totalItems = 0;
$scope.blockchain_txs = [];
$scope.alternativeCurrency = [];
+
+ $scope.selectPage = function(page) {
+ $scope.currentPage = page;
+ $scope.update();
+ };
+
$scope.update = function() {
$scope.getTransactions();
};
@@ -28,24 +35,6 @@ angular.module('copayApp.controllers').controller('HistoryController',
}, 1);
};
- $scope.nextPage = function() {
- $scope.currentPage++;
- $scope.update();
- };
-
- $scope.previousPage = function() {
- $scope.currentPage--;
- $scope.update();
- };
-
- $scope.hasNextPage = function() {
- return $scope.currentPage < $scope.nbPages;
- };
-
- $scope.hasPreviousPage = function() {
- return $scope.currentPage > 1;
- };
-
$scope.getTransactions = function() {
var w = $rootScope.wallet;
if (!w) return;
@@ -72,6 +61,7 @@ angular.module('copayApp.controllers').controller('HistoryController',
});
$scope.blockchain_txs = w.cached_txs = items;
$scope.nbPages = res.nbPages;
+ $scope.totalItems = res.nbItems;
$scope.loading = false;
diff --git a/views/history.html b/views/history.html
index deac8c694..b8805bad5 100644
--- a/views/history.html
+++ b/views/history.html
@@ -100,8 +100,7 @@
-
-
+