Skip to content

Commit

Permalink
prevent rewriting profile and config after restore
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyofbyteball committed Jul 27, 2018
1 parent a764c38 commit 7d347fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/js/controllers/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ angular.module('copayApp.controllers').controller('importController',
if (key == 'profile') {
zip.file(key).async('string').then(function(data) {
storageService.storeProfile(Profile.fromString(data), callback);
storageService.storeProfile = function(){};
});
}
else if (key == 'config') {
zip.file(key).async('string').then(function(data) {
storageService.storeConfig(data, callback);
storageService.storeConfig = function(){};
});
}
else if (/\.sqlite/.test(key)) {
Expand All @@ -86,12 +88,14 @@ angular.module('copayApp.controllers').controller('importController',
fileSystemService.readFile(dbDirPath + 'temp/' + 'profile', function(err, data) {
if(err) return callback(err);
storageService.storeProfile(Profile.fromString(data.toString()), callback)
storageService.storeProfile = function(){};
});
},
function(callback) {
fileSystemService.readFile(dbDirPath + 'temp/' + 'config', function(err, data) {
if(err) return callback(err);
storageService.storeConfig(data.toString(), callback);
storageService.storeConfig = function(){};
});
},
function(callback) {
Expand Down

0 comments on commit 7d347fa

Please sign in to comment.