remove history cache from export

This commit is contained in:
Gabriel Bazán 2016-06-17 11:46:40 -03:00 committed by Gustavo Maximiliano Cortez
commit b433120121
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 11 additions and 52 deletions

View file

@ -40,7 +40,7 @@ angular.module('copayApp.services')
var a = angular.element('<a></a>');
var blob = new NewBlob(ew, 'text/plain;charset=utf-8');
a.attr('href',window.URL.createObjectURL(blob));
a.attr('href', window.URL.createObjectURL(blob));
a.attr('download', filename);
a[0].click();
return cb();
@ -49,7 +49,6 @@ angular.module('copayApp.services')
root.addMetadata = function(b, opts) {
b = JSON.parse(b);
if (opts.historyCache) b.historyCache = opts.historyCache;
if (opts.addressBook) b.addressBook = opts.addressBook;
return JSON.stringify(b);
}
@ -62,7 +61,7 @@ angular.module('copayApp.services')
try {
opts = opts || {};
var b = fc.export(opts);
if (opts.historyCache || opts.addressBook) b = root.addMetadata(b, opts);
if (opts.addressBook) b = root.addMetadata(b, opts);
var e = sjcl.encrypt(password, b, {
iter: 10000