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

@ -3,6 +3,7 @@
angular.module('copayApp.controllers').controller('MoreController',
function($scope, $rootScope, $location, $filter, backupService, walletFactory, controllerUtils, notification, rateService) {
var w = $rootScope.wallet;
$scope.isSafari = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0;
$scope.unitOpts = [{
name: 'Satoshis (100,000,000 satoshis = 1BTC)',
@ -74,6 +75,11 @@ angular.module('copayApp.controllers').controller('MoreController',
backupService.download(w);
}
$scope.viewBackup = function() {
$scope.backupPlainText = backupService.getBackup(w);
$scope.hideViewBackup = true;
};
$scope.deleteWallet = function() {
walletFactory.delete(w.id, function() {
controllerUtils.logout();