diff --git a/src/js/controllers/export.js b/src/js/controllers/export.js index 4c0b8c773..358a211da 100644 --- a/src/js/controllers/export.js +++ b/src/js/controllers/export.js @@ -1,7 +1,7 @@ 'use strict'; angular.module('copayApp.controllers').controller('exportController', - function($scope, $timeout, $log, $ionicHistory, $ionicScrollDelegate, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService) { + function($scope, $timeout, $log, $ionicHistory, $ionicScrollDelegate, backupService, walletService, storageService, profileService, platformInfo, gettextCatalog, $state, $stateParams, popupService, $window) { var wallet = profileService.getWallet($stateParams.walletId); $scope.showAdvChange = function() { @@ -191,7 +191,7 @@ angular.module('copayApp.controllers').controller('exportController', if ($scope.formData.noSignEnabled) name = name + '(No Private Key)'; - var subject = 'Copay Wallet Backup: ' + name; + var subject = $window.appConfig.nameCase + ' Wallet Backup: ' + name; var body = 'Here is the encrypted backup of the wallet ' + name + ': \n\n' + ew + '\n\n To import this backup, copy all text between {...}, including the symbols {}'; window.plugins.socialsharing.shareViaEmail( body, diff --git a/src/js/controllers/preferencesHistory.js b/src/js/controllers/preferencesHistory.js index 68366fd15..0cd529a04 100644 --- a/src/js/controllers/preferencesHistory.js +++ b/src/js/controllers/preferencesHistory.js @@ -1,10 +1,11 @@ 'use strict'; angular.module('copayApp.controllers').controller('preferencesHistory', - function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, gettextCatalog, storageService, platformInfo, profileService, lodash) { + function($scope, $log, $stateParams, $timeout, $state, $ionicHistory, gettextCatalog, storageService, platformInfo, profileService, lodash, $window) { $scope.wallet = profileService.getWallet($stateParams.walletId); $scope.csvReady = false; $scope.isCordova = platformInfo.isCordova; + $scope.appName = $window.appConfig.nameCase; $scope.csvHistory = function(cb) { var allTxs = []; @@ -31,8 +32,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory', if (err) { $log.warn('Failed to generate CSV:', err); $scope.err = err; - } - else { + } else { $log.warn('Failed to generate CSV: no transactions'); $scope.err = 'no transactions'; } @@ -45,7 +45,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory', var data = txs; var satToBtc = 1 / 100000000; $scope.csvContent = []; - $scope.csvFilename = 'Copay-' + $scope.wallet.name + '.csv'; + $scope.csvFilename = $scope.appName + '-' + $scope.wallet.name + '.csv'; $scope.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment']; var _amount, _note, _copayers, _creator, _comment; diff --git a/src/js/services/backupService.js b/src/js/services/backupService.js index b39834627..165aa4a2e 100644 --- a/src/js/services/backupService.js +++ b/src/js/services/backupService.js @@ -1,6 +1,6 @@ 'use strict'; angular.module('copayApp.services') - .factory('backupService', function backupServiceFactory($log, $timeout, $stateParams, profileService, sjcl) { + .factory('backupService', function backupServiceFactory($log, $timeout, $stateParams, profileService, sjcl, $window) { var root = {}; @@ -80,7 +80,7 @@ angular.module('copayApp.services') var walletName = (wallet.alias || '') + (wallet.alias ? '-' : '') + wallet.credentials.walletName; if (opts.noSign) walletName = walletName + '-noSign' - var filename = walletName + '-Copaybackup.aes.json'; + var filename = walletName + '-' + $window.appConfig.nameCase + 'backup.aes.json'; _download(ew, filename, cb) }; return root; diff --git a/www/views/preferencesHistory.html b/www/views/preferencesHistory.html index 25d08b2d3..272ab99ac 100644 --- a/www/views/preferencesHistory.html +++ b/www/views/preferencesHistory.html @@ -6,7 +6,7 @@
- + Export to file