Merge pull request #1437 from isocolsky/fix/reconnect

On reconnect do not redirect to 'receive' tab
This commit is contained in:
Matias Alejo Garcia 2014-09-22 09:58:13 -03:00
commit 5e4593d93e
1 changed files with 8 additions and 4 deletions

View File

@ -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');
}
}
});
@ -139,6 +142,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) {