Merge pull request #6321 from cmgustavo/bug/path-to-allAddresses

Fixes path to allAddresses from walletDetails
This commit is contained in:
Gabriel Edgardo Bazán 2017-06-28 16:16:52 -03:00 committed by GitHub
commit e6f774c989
5 changed files with 31 additions and 4 deletions

View file

@ -141,7 +141,14 @@ angular.module('copayApp.controllers').controller('addressesController', functio
};
$scope.viewAllAddresses = function() {
$state.go('tabs.settings.allAddresses', {
var fromView = $ionicHistory.currentStateName();
var path;
if (fromView.indexOf('settings') !== -1) {
path = 'tabs.settings.allAddresses';
} else {
path = 'tabs.wallet.allAddresses';
}
$state.go(path, {
walletId: $scope.wallet.id
});
};