reuse changeWallet on walletbar

This commit is contained in:
Matias Alejo Garcia 2014-12-07 20:41:17 -03:00
commit b370e710fe
3 changed files with 5 additions and 11 deletions

View file

@ -27,18 +27,18 @@ angular.module('copayApp.services')
});
};
// TODO should be on 'walletService'
// TODO should be on 'walletService' or 'go'
root.goWalletHome = function() {
var w = $rootScope.wallet;
if (w) {
$rootScope.starting = false;
if (!w.isComplete()) {
$location.path('/copayers');
go.go('copayers');
} else {
if ($rootScope.pendingPayment) {
$location.path('paymentIntent');
go.go('paymentIntent');
} else {
$location.path('homeWallet');
go.go('homeWallet');
}
}
}