From dadf8396f5e300342c9dc26368085fad0eb4307b Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Fri, 19 Sep 2014 11:27:48 -0300 Subject: [PATCH] On reconnect do not redirect to 'receive' tab --- js/services/controllerUtils.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/services/controllerUtils.js b/js/services/controllerUtils.js index 8926fd877..bb728f2fc 100644 --- a/js/services/controllerUtils.js +++ b/js/services/controllerUtils.js @@ -55,10 +55,13 @@ angular.module('copayApp.services') }); w.on('ready', function(myPeerID) { $rootScope.wallet = w; - if ($rootScope.pendingPayment) { - $location.path('send'); - } else { - $location.path('receive'); + if ($rootScope.initialConnection) { + $rootScope.initialConnection = false; + if ($rootScope.pendingPayment) { + $location.path('send'); + } else { + $location.path('receive'); + } } }); @@ -137,6 +140,7 @@ angular.module('copayApp.services') uriHandler.register(); $rootScope.unitName = config.unitName; $rootScope.txAlertCount = 0; + $rootScope.initialConnection = true; $rootScope.reconnecting = false; $rootScope.isCollapsed = true; $rootScope.$watch('txAlertCount', function(txAlertCount) {