fix tests

This commit is contained in:
Matias Alejo Garcia 2016-07-28 15:04:09 -03:00
commit fb578eaffb
No known key found for this signature in database
GPG key ID: 02470DB551277AB3
8 changed files with 22 additions and 110 deletions

View file

@ -11,6 +11,7 @@ angular.module('copayApp.controllers').controller('disclaimerController',
var create = function(opts) {
opts = opts || {};
$log.debug('Creating profile');
profileService.create(opts, function(err) {
if (err) {
$log.warn(err);
@ -30,7 +31,6 @@ angular.module('copayApp.controllers').controller('disclaimerController',
}
}, 3000);
};
$scope.error = "";
ongoingProcess.set('creatingWallet', false);
});

View file

@ -348,9 +348,9 @@ angular.module('copayApp.controllers').controller('importController',
};
$scope.setSeedSource = function() {
if (!$scope.seedSource) return;
$scope.seedSourceId = $scope.seedSource.id;
$timeout(function() {
$rootScope.$apply();
});

View file

@ -8,6 +8,7 @@ angular.module('copayApp.services')
var ls = ((typeof window.localStorage !== "undefined") ? window.localStorage : null);
if (isChromeApp && !isNW && !ls) {
$log.info('Using CHROME storage');
ls = chrome.storage.local;
}

View file

@ -123,6 +123,7 @@ angular.module('copayApp.services')
var validationLock = false;
root.runValidation = function(client, delay, retryDelay) {
delay = delay || 500;
retryDelay = retryDelay || 50;
@ -152,6 +153,7 @@ angular.module('copayApp.services')
$log.warn('Key Derivation failed for wallet:' + walletId);
storageService.clearLastAddress(walletId, function() {});
}
root.storeProfileIfDirty();
$rootScope.$emit('Local/ValidatingWalletEnded', walletId, isOK);
});
@ -663,9 +665,11 @@ angular.module('copayApp.services')
root.createDefaultProfile(opts, function(err, p) {
if (err) return cb(err);
root.bindProfile(p, function(err) {
// ignore NONAGREEDDISCLAIMER
storageService.storeNewProfile(p, function(err) {
storageService.storeNewProfile(p, function(err) {
if (err) return cb(err);
root.bindProfile(p, function(err) {
// ignore NONAGREEDDISCLAIMER
if (err && err.toString().match('NONAGREEDDISCLAIMER')) return cb();
return cb(err);
});
});