Fixes path to allAddresses from walletDetails

This commit is contained in:
Gustavo Maximiliano Cortez 2017-06-28 15:25:58 -03:00
commit 1cd1fdafd5
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
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
});
};