add options to show the private key

This commit is contained in:
Matias Alejo Garcia 2014-08-20 14:06:37 -04:00
commit fea90215d4
2 changed files with 13 additions and 2 deletions

View file

@ -1,8 +1,14 @@
'use strict';
angular.module('copayApp.controllers').controller('BackupController',
function($scope, $rootScope, backupService, walletFactory, controllerUtils) {
function($scope, $rootScope, $location, backupService, walletFactory, controllerUtils) {
var s = ($location.search()).showPrivate;
if (s) {
var w = $rootScope.wallet;
$scope.priv = w.privateKey.toObj().extendedPrivateKeyString;
}
$scope.downloadBackup = function() {
var w = $rootScope.wallet;
backupService.download(w);