View plain text backup for Safari

This commit is contained in:
Gustavo Maximiliano Cortez 2014-10-09 10:37:00 -03:00
commit 7beb2589d6
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';