diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index c5978d016ef7d4f9016d867bd3e631e2cfc903fd..a8c821b79834902a67469c701ffe01fbe2e8e971 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -677,7 +677,7 @@ function WalletController($scope, $rootScope, $q, $ionicPopup, $timeout, $state, function WalletTxController($scope, $ionicPopover, $state, $timeout, $location, - UIUtils, Modals, csPopovers, BMA, csSettings, csCurrency, csWallet, csTx) { + UIUtils, Modals, csPopovers, BMA, csHttp, csSettings, csCurrency, csWallet, csTx) { 'ngInject'; $scope.loading = true; @@ -774,10 +774,12 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location, // Updating wallet data $scope.doUpdate = function(silent) { console.debug('[wallet] TX history reloading...'); + var fromTime = $scope.formData && $scope.formData.tx && $scope.formData.tx.fromTime || undefined; var options = { sources: true, tx: { - enable: true + enable: true, + fromTime: fromTime }, api: false }; @@ -865,10 +867,10 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location, fromTime = fromTime || ($scope.formData.tx.fromTime - csSettings.data.walletHistoryTimeSecond) || - (moment().utc().unix()- 2 * csSettings.data.walletHistoryTimeSecond); + (csHttp.date.now() - 2 * csSettings.data.walletHistoryTimeSecond); UIUtils.loading.show(); - return wallet.refreshData({tx: {enable: true,fromTime: fromTime}}) + return wallet.refreshData({tx: {enable: true, fromTime: fromTime}}) .then(function() { $scope.updateView(); UIUtils.loading.hide(); diff --git a/www/templates/wallet/view_wallet_tx.html b/www/templates/wallet/view_wallet_tx.html index 951b2c0c44efb30ddb3125e5f11b3f62d0342661..7a0c23caab0a6efbcb564d9e17f83d0b1bd16daf 100644 --- a/www/templates/wallet/view_wallet_tx.html +++ b/www/templates/wallet/view_wallet_tx.html @@ -132,7 +132,7 @@ <span class="gray">{{:locale:'ACCOUNT.NO_TX'|translate}}</span> </span> - <div ng-repeat="tx in formData.tx.history" + <div ng-repeat="tx in formData.tx.history track by tx.hash" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? 'templates/wallet/item_tx.html' : 'templates/wallet/item_ud.html'"> </div> diff --git a/www/templates/wot/view_identity_tx.html b/www/templates/wot/view_identity_tx.html index e68d325524fbf55a34fee455298878b3ff1fdcd6..9c9570b768144ba7c482d3a846d14e8431c19cb4 100644 --- a/www/templates/wot/view_identity_tx.html +++ b/www/templates/wot/view_identity_tx.html @@ -92,7 +92,7 @@ </span> <!-- iterate on each TX --> - <div ng-repeat="tx in formData.tx.history" + <div ng-repeat="tx in formData.tx.history track by tx.hash" class="item item-tx item-icon-left" ng-include="::!tx.isUD ? 'templates/wallet/item_tx.html' : 'templates/wallet/item_ud.html'"> </div>