mirror of https://github.com/BTCPrivate/copay.git
Removed console errors
This commit is contained in:
parent
16c3d66f33
commit
0c741814f3
|
@ -19,12 +19,6 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
var _importBackup = function(str) {
|
||||
var password = $scope.password;
|
||||
updateStatus('Importing profile - Setting things up...');
|
||||
// var skipFields = [];
|
||||
// if ($scope.skipPublicKeyRing)
|
||||
// skipFields.push('publicKeyRing');
|
||||
//
|
||||
// if ($scope.skipTxProposals)
|
||||
// skipFields.push('txProposals');
|
||||
|
||||
copay.Identity.importFromEncryptedFullJson(str, password, {
|
||||
pluginManager: pluginManager,
|
||||
|
@ -34,11 +28,9 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
|
|||
passphraseConfig: config.passphraseConfig,
|
||||
}, function(err, iden) {
|
||||
if (err && !iden) {
|
||||
console.log('Error:' + err)
|
||||
controllerUtils.onErrorDigest(
|
||||
$scope, (err.toString() || '').match('BADSTR') ? 'Bad password or corrupt profile file' : 'Unknown error');
|
||||
} else {
|
||||
console.log('Success.....Profile imported successfully');
|
||||
notification.info('Success', 'Profile imported successfully');
|
||||
$location.path('/');
|
||||
}
|
||||
|
|
|
@ -287,17 +287,6 @@ Identity.prototype.close = function(cb) {
|
|||
* @return {Wallet}
|
||||
*/
|
||||
Identity.prototype.importEncryptedWallet = function(cypherText, password, opts, cb) {
|
||||
console.log('importEncryptedWallet------');
|
||||
|
||||
console.log('opts');
|
||||
console.log(opts);
|
||||
|
||||
console.log('password');
|
||||
console.log(password);
|
||||
|
||||
console.log('cypherText');
|
||||
console.log(cypherText);
|
||||
|
||||
var crypto = opts.cryptoUtil || cryptoUtil;
|
||||
// TODO set iter and salt using config.js
|
||||
var key = crypto.kdf(password);
|
||||
|
@ -355,7 +344,11 @@ Identity.prototype.closeWallet = function(wallet, cb) {
|
|||
Identity.importFromEncryptedFullJson = function(str, password, opts, cb) {
|
||||
var crypto = opts.cryptoUtil || cryptoUtil;
|
||||
var key = crypto.kdf(password);
|
||||
return Identity.importFromFullJson(crypto.decrypt(key, str), password, opts, cb);
|
||||
var str = crypto.decrypt(key, str);
|
||||
if (!str) {
|
||||
return cb('BADSTR');
|
||||
}
|
||||
return Identity.importFromFullJson(str, password, opts, cb);
|
||||
};
|
||||
|
||||
Identity.importFromFullJson = function(str, password, opts, cb) {
|
||||
|
@ -364,7 +357,7 @@ Identity.importFromFullJson = function(str, password, opts, cb) {
|
|||
try {
|
||||
json = JSON.parse(str);
|
||||
} catch (e) {
|
||||
return cb('Unable to retrieve json from string', str);
|
||||
return cb('BADSTR: Unable to retrieve json from string', str);
|
||||
}
|
||||
|
||||
// if (!_.isNumber(json.iterations))
|
||||
|
|
|
@ -112,7 +112,6 @@ angular
|
|||
$location.path('unsupported');
|
||||
} else {
|
||||
if (!$rootScope.iden && next.logged) {
|
||||
console.log('not logged... redirecting')
|
||||
$idle.unwatch();
|
||||
$location.path('/');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue