mirror of https://github.com/BTCPrivate/copay.git
added auto backup after create/join
This commit is contained in:
parent
b40038a554
commit
eeb621b601
|
@ -33,7 +33,7 @@ var valid_pairs = {
|
|||
};
|
||||
|
||||
angular.module('copayApp.controllers').controller('SetupController',
|
||||
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase) {
|
||||
function($scope, $rootScope, $location, $timeout, walletFactory, controllerUtils, Passphrase, backupService) {
|
||||
|
||||
$rootScope.videoInfo = {};
|
||||
$scope.loading = false;
|
||||
|
@ -84,6 +84,7 @@ angular.module('copayApp.controllers').controller('SetupController',
|
|||
passphrase: passphrase,
|
||||
};
|
||||
var w = walletFactory.create(opts);
|
||||
backupService.download(w);
|
||||
controllerUtils.startNetwork(w, $scope);
|
||||
});
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('SigninController',
|
||||
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase) {
|
||||
function($scope, $rootScope, $location, walletFactory, controllerUtils, Passphrase, backupService) {
|
||||
var cmp = function(o1, o2) {
|
||||
var v1 = o1.show.toLowerCase(),
|
||||
v2 = o2.show.toLowerCase();
|
||||
|
|
|
@ -10,7 +10,7 @@ BackupService.prototype.download = function(wallet) {
|
|||
var ew = wallet.toEncryptedObj();
|
||||
var timestamp = +(new Date());
|
||||
var walletName = this.getName(wallet);
|
||||
var filename = walletName + '-' + timestamp + '.json.aes';
|
||||
var filename = walletName + '-' + timestamp + '-keybackup.json.aes';
|
||||
var blob = new Blob([ew], {
|
||||
type: 'text/plain;charset=utf-8'
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue