From d6c1737da3af5dcbe6922abe0c4cc42ae51eccf0 Mon Sep 17 00:00:00 2001 From: blavenie <benoit.lavenier@e-is.pro> Date: Tue, 28 Aug 2018 18:46:43 +0200 Subject: [PATCH] [fix] TX history: "show all" button not working - fix #727 --- platforms/desktop | 2 +- www/js/controllers/wallet-controllers.js | 6 ++++-- www/js/services/wallet-services.js | 5 +++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/platforms/desktop b/platforms/desktop index b828d3b53..3d8750ea5 160000 --- a/platforms/desktop +++ b/platforms/desktop @@ -1 +1 @@ -Subproject commit b828d3b53a649d2c64b935c75bdc782358d1c496 +Subproject commit 3d8750ea54cf459784c1f3c425b2b44845688642 diff --git a/www/js/controllers/wallet-controllers.js b/www/js/controllers/wallet-controllers.js index c415480d5..0b844f132 100644 --- a/www/js/controllers/wallet-controllers.js +++ b/www/js/controllers/wallet-controllers.js @@ -694,8 +694,10 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location, $scope.load = function() { if (!wallet) return; + var hasMinData = wallet.isDataLoaded({minData: true}); var options = { - minData: !wallet.isDataLoaded({minData: true}), + requirements: !hasMinData, // load requirements (=minData) once + minData: !hasMinData, sources: true, tx: { enable: true @@ -836,7 +838,7 @@ function WalletTxController($scope, $ionicPopover, $state, $timeout, $location, (Math.trunc(new Date().getTime() / 1000) - 2 * csSettings.data.walletHistoryTimeSecond); UIUtils.loading.show(); - return csWallet.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/js/services/wallet-services.js b/www/js/services/wallet-services.js index 96eecea20..1d402fab1 100644 --- a/www/js/services/wallet-services.js +++ b/www/js/services/wallet-services.js @@ -914,6 +914,11 @@ angular.module('cesium.wallet.services', ['ngApi', 'ngFileSaver', 'cesium.bma.se // Force some load (requirements) if not already loaded options.requirements = angular.isDefined(options.requirements) ? options.requirements : angular.isDefined(data.requirements.needSelf); + // Force sources when TX enable + if (angular.isUndefined(options.sources) && options.tx && options.tx.enable) { + options.sources = true; + } + var jobs = []; // Get requirements -- GitLab