Merge pull request #1560 from cmgustavo/feature/01-backup-plain-text

View plain text backup on Safari
This commit is contained in:
Ivan Socolsky 2014-10-10 17:48:46 -03:00
commit 599f049e3a
5 changed files with 61 additions and 16 deletions

View file

@ -13,8 +13,12 @@ BackupService.prototype.getCopayer = function(wallet) {
return wallet.totalCopayers > 1 ? wallet.getMyCopayerNickname() : '';
};
BackupService.prototype.getBackup = function(wallet) {
return wallet.toEncryptedObj();
};
BackupService.prototype.download = function(wallet) {
var ew = wallet.toEncryptedObj();
var ew = this.getBackup(wallet);
var walletName = this.getName(wallet);
var copayerName = this.getCopayer(wallet);
var filename = (copayerName ? copayerName + '-' : '') + walletName + '-keybackup.json.aes';