diff --git a/js/controllers/send.js b/js/controllers/send.js index 4b98044e7..6ae640601 100644 --- a/js/controllers/send.js +++ b/js/controllers/send.js @@ -55,8 +55,6 @@ angular.module('copayApp.controllers').controller('SendController', } }); $scope.txps = res.txs; -// TODO -// $rootScope.pendingTxCount = res.pendingForUs; }; /** @@ -100,7 +98,8 @@ angular.module('copayApp.controllers').controller('SendController', }); - $scope.loadTxs = function() { + $scope.init = function() { + $rootScope.pendingTxCount = 0; $scope.updateTxs(); setTimeout(function() { $scope.loading = false; diff --git a/js/controllers/sidebar.js b/js/controllers/sidebar.js index 63a1d208e..5da6e83ab 100644 --- a/js/controllers/sidebar.js +++ b/js/controllers/sidebar.js @@ -46,8 +46,9 @@ angular.module('copayApp.controllers').controller('SidebarController', function( $scope.init = function() { - - // Change focused wallet + // This should be called only once. + + // focused wallet change if ($rootScope.wallet) { $rootScope.$watch('wallet', function() { $scope.walletSelection = false; @@ -55,7 +56,7 @@ angular.module('copayApp.controllers').controller('SidebarController', function( }); } - // Change wallet list + // wallet list chane if ($rootScope.iden) { var iden = $rootScope.iden; iden.on('newWallet', function() { diff --git a/js/services/pendingTxsService.js b/js/services/pendingTxsService.js index 9e9ab08b9..59a60409a 100644 --- a/js/services/pendingTxsService.js +++ b/js/services/pendingTxsService.js @@ -5,7 +5,11 @@ angular.module('copayApp.services') .factory('pendingTxsService', function($rootScope, $sce, $location, $filter, notification, $timeout, rateService) { var root = {}; root.update = function(w) { -console.log('[pendingTxsService.js.8] TODO updade pending Txs'); //TODO + var w = $rootScope.wallet; + if (!w) return; + + var res = w.getPendingTxProposals(); + $rootScope.pendingTxCount = res.pendingForUs; }; return root; }); diff --git a/views/profile.html b/views/profile.html index e1b1ebea2..f809c7f4c 100644 --- a/views/profile.html +++ b/views/profile.html @@ -49,6 +49,7 @@ Type Status Balance + Approx Size Actions @@ -69,6 +70,12 @@ {{item.balanceInfo.totalBalance || 0 |noFractionNumber}} {{item.settings.unitName}} + + + {{item.sizes().total/1000}} kB + + +
+

Pending Transactions Proposals