fix rebase problem

This commit is contained in:
Gabriel Bazán 2015-11-11 18:54:41 -03:00
commit 3ae7b314d5
2 changed files with 12 additions and 7 deletions

View file

@ -45,6 +45,14 @@
</form>
<h4></h4>
<ul class="no-bullet m0">
<li>
<switch id="no-metaData" name="metaData" ng-model="metaData" class="green right"></switch>
<span translate>Include address book and history cache</span>
</li>
</ul>
<ul class="no-bullet m0" ng-show="index.canSign">
<li>
<switch id="no-sign" name="noSign" ng-model="noSign" class="green right"></switch>

View file

@ -6,12 +6,12 @@ angular.module('copayApp.controllers').controller('backupController',
self.error = null;
self.success = null;
$scope.metaData = true;
var fc = profileService.focusedClient;
self.isEncrypted = fc.isPrivKeyEncrypted();
self.downloadWalletBackup = function() {
self.getMetaData(function(err, txsFromLocal, localAddressBook) {
self.getMetaData($scope.metaData, function(err, txsFromLocal, localAddressBook) {
if (err) {
self.error = true;
return;
@ -28,14 +28,14 @@ angular.module('copayApp.controllers').controller('backupController',
return;
}
$rootScope.$emit('Local/BackupDone');
notification.success(gettext('Success'), gettext('Encrypted export file saved'));
go.walletHome();
});
});
};
self.getMetaData = function(cb) {
self.getMetaData = function(metaData, cb) {
if (metaData == false) return cb();
self.getHistoryCache(function(err, txsFromLocal) {
if (err) return cb(err);
@ -108,7 +108,6 @@ angular.module('copayApp.controllers').controller('backupController',
var ew = backup;
if (!ew) return;
self.backupWalletPlainText = ew;
$rootScope.$emit('Local/BackupDone');
});
}, 100);
};
@ -119,7 +118,6 @@ angular.module('copayApp.controllers').controller('backupController',
if (!ew) return;
window.cordova.plugins.clipboard.copy(ew);
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
$rootScope.$emit('Local/BackupDone');
});
};
@ -145,7 +143,6 @@ angular.module('copayApp.controllers').controller('backupController',
body: 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}',
isHtml: false
};
$rootScope.$emit('Local/BackupDone');
window.plugin.email.open(properties);
});
};