fix tests and stringify for localstorage

This commit is contained in:
Matias Alejo Garcia 2014-08-15 12:43:43 -04:00
commit 18aadede29
9 changed files with 75 additions and 76 deletions

View file

@ -26,7 +26,7 @@ angular.module('copayApp.services')
Socket.removeAllListeners();
$rootScope.wallet = $rootScope.tmp = null;
$rootScope.wallet = null;
delete $rootScope['wallet'];
video.close();
@ -72,7 +72,6 @@ angular.module('copayApp.services')
root.setupRootVariables = function() {
uriHandler.register();
$rootScope.unitName = config.unitName;
$rootScope.showLockWarning = false;
$rootScope.txAlertCount = 0;
$rootScope.insightError = 0;
$rootScope.isCollapsed = true;
@ -125,12 +124,6 @@ angular.module('copayApp.services')
};
notification.enableHtml5Mode(); // for chrome: if support, enable it
w.on('locked', function() {
$rootScope.tmp = w;
$rootScope.showLockWarning=true;
$location.path('/warning');
$rootScope.$digest();
});
w.on('badMessage', function(peerId) {
notification.error('Error', 'Received wrong message from peer ' + peerId);
@ -195,6 +188,7 @@ angular.module('copayApp.services')
$rootScope.$digest();
});
w.on('close', root.onErrorDigest);
w.on('locked', root.onErrorDigest.bind(this));
w.netStart();
};