function AppRun(AppConstants, $rootScope, $timeout, Wallet) {
    'ngInject';

    // change page title based on state
    $rootScope.$on('$stateChangeSuccess', (event, toState) => {
        $rootScope.setPageTitle(toState.title);
        // enable tooltips globally
        $timeout( function() {
            $('[data-toggle="tooltip"]').tooltip()
        });
    });

    // Helper method for setting the page's title
    $rootScope.setPageTitle = (title) => {
        $rootScope.pageTitle = '';
        if (title) {
            $rootScope.pageTitle += title;
            $rootScope.pageTitle += ' \u2014 ';
        }
        $rootScope.pageTitle += AppConstants.appName;
    };
}

export default AppRun;

@@ -51,16 +51,37 @@
 , Wallet
+, Alert, $transitions
 ) %7B%0A    
@@ -101,12 +101,13 @@
     
+ 
 // 
-c
+C
 hang
@@ -143,60 +143,55 @@
    $
-rootScope.$on('$stateChangeSuccess', (event, toState
+transitions.onSuccess(%7B to: true %7D, (transition
 ) =%3E
@@ -230,14 +230,40 @@
 le(t
-oState
+ransition.router.globals.current
 .tit
@@ -278,17 +278,17 @@
      // 
-e
+E
 nable to
@@ -396,16 +396,447 @@
      %7D);
+     %0A    %7D);%0A%0A    // Check if a wallet is loaded before accessing private states%0A    $transitions.onStart(%7B %0A        to: (state) =%3E %7B %0A            return (state.name !== 'app.home') && (state.name !== 'app.login') && (state.name !== 'app.signup'); %0A        %7D%0A    %7D, (transition) =%3E %7B%0A        if (!Wallet.current) %7B%0A            Alert.noWalletLoaded();%0A            return transition.router.stateService.target('app.home');%0A        %7D
 %0A    %7D);

Check if a wallet is loaded before accessing private states