Fix fee level, preferences by wallet, delete, info

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-05 17:36:11 -03:00
commit a1672e1e95
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
17 changed files with 106 additions and 128 deletions

View file

@ -1,13 +1,13 @@
<ion-modal-view ng-controller="addressbookModalController" ng-init="initAddressbook()"> <ion-modal-view ng-controller="addressbookModalController" ng-init="initAddressbook()">
<ion-header-bar align-title="center" class="bar-royal"> <ion-header-bar align-title="center" class="bar-royal">
<button class="button back-button" ng-click="closeAddressbookModal()"> <button class="button button-clear" ng-click="closeAddressbookModal()">
<i class="icon ion-ios-arrow-thin-left"></i> Close
</button> </button>
<div class="h1 title"> <div class="h1 title">
<span ng-show="!addAddressbookEntry" translate>Addressbook</span> <span ng-show="!addAddressbookEntry" translate>Addressbook</span>
<span ng-show="addAddressbookEntry" translate>Add entry</span> <span ng-show="addAddressbookEntry" translate>Add entry</span>
</div> </div>
<button class="button button-clear button-positive" <button class="button button-clear"
ng-click="toggleAddAddressbookEntry()"> ng-click="toggleAddAddressbookEntry()">
<i ng-show="!addAddressbookEntry" class="icon ion-ios-plus-empty"></i> <i ng-show="!addAddressbookEntry" class="icon ion-ios-plus-empty"></i>
<span ng-show="addAddressbookEntry" translate>Cancel</span> <span ng-show="addAddressbookEntry" translate>Cancel</span>

View file

@ -6,33 +6,24 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesController" ng-init="init()"> <ion-content ng-controller="preferencesController" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"> <div class="item item-divider"></div>
Preferences
</div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAlias"> <div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAlias">
<span translate>Wallet Name</span> <span translate>Name</span>
<span class="item-note"> <span class="item-note">
{{alias||wallet.walletName}} {{wallet.name}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon ion-ios-arrow-right"></i>
</div> </div>
<div class="item">
<span translate>Wallet Type</span>
<span class="item-note">
{{wallet.m}}-of-{{wallet.n}}
</span>
</div>
<div class="item" ng-show="wallet.isPrivKeyExternal()"> <div class="item" ng-show="wallet.isPrivKeyExternal()">
<span translate>Hardware wallet</span> <span translate>Hardware Wallet</span>
<span class="item-note"> <span class="item-note">
{{wallet.externalSource}} {{wallet.externalSource}}
</span> </span>
</div> </div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesColor"> <div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesColor">
<span ng-style="{'color': wallet.color}">&block;</span> <span translate>Color</span>
<span translate>Wallet Color</span> <span class="item-note" ng-style="{'color': wallet.color}">
<span class="item-note"> &block;
{{wallet.alias||wallet.walletName}}
</span> </span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon ion-ios-arrow-right"></i>
</div> </div>
@ -65,9 +56,7 @@
<span translate>Delete recovery phrase</span> <span translate>Delete recovery phrase</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon ion-ios-arrow-right"></i>
</div> </div>
<div class="item item-divider" translate> <div class="item item-divider"></div>
Advanced
</div>
<div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAdvanced"> <div class="item item-icon-right" href ui-sref="tabs.preferences.preferencesAdvanced">
<span translate>Advanced</span> <span translate>Advanced</span>
<i class="icon ion-ios-arrow-right"></i> <i class="icon ion-ios-arrow-right"></i>

View file

@ -6,12 +6,18 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesAliasController" > <ion-content ng-controller="preferencesAliasController" >
<form name="aliasForm" ng-submit="save(aliasForm)" novalidate> <form name="aliasForm" ng-submit="save(aliasForm)" novalidate>
<label class="item item-input item-stacked-label"> <div class="card list">
<span class="input-label" transalate>Alias for {{walletName}}</span> <label class="item item-input item-stacked-label">
<input type="text" id="alias" name="alias" ng-model="alias" placeholder="John" required></input> <span class="input-label" transalate>Alias for {{walletName}}</span>
</label> <input type="text" id="alias" name="alias" ng-model="alias" placeholder="John" required>
<input type="submit" class="button button-block button-stable" value="{{'Save'|translate}}" ng-disabled="aliasForm.$invalid"> </label>
</div>
<button type="submit"
class="button button-block button-positive"
ng-disabled="aliasForm.$invalid" translate>
Save
</button>
</form> </form>
<div translate>Changing wallet alias only affects the local wallet name.</div> <div class="text-center" translate>Changing wallet alias only affects the local wallet name.</div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -6,17 +6,15 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesBwsUrlController"> <ion-content ng-controller="preferencesBwsUrlController">
<div class="row no-border"> <div class="card list">
<div class="col col-90"> <label class="item item-input item-stacked-label no-border">
<label class="item item-input item-stacked-label no-border"> <span class="input-label">Wallet Service URL</span>
<span class="input-label" transalate>Wallet Service URL</span> <input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="bwsurl">
<input type="text" id="bwsurl" type="text" name="bwsurl" ng-model="bwsurl"> <a class="postfix" on-tap="resetDefaultUrl()">
</label> <i class="icon ion-ios-reload"></i>
</div> </a>
<div class="col"> </label>
<i class="icon ion-ios-reload" ng-click="resetDefaultUrl()"></i>
</div>
</div> </div>
<button class="button button-block button-balanced" ng-click="save()" translate>Save</button> <button class="button button-block button-positive" ng-click="save()" translate>Save</button>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -4,12 +4,14 @@
<i class="icon ion-ios-arrow-thin-left"></i> <i class="icon ion-ios-arrow-thin-left"></i>
</ion-nav-back-button> </ion-nav-back-button>
</ion-nav-bar> </ion-nav-bar>
<ion-content class="has-header" ng-controller="preferencesDeleteWalletController" > <ion-content ng-controller="preferencesDeleteWalletController" >
<div translate>Warning!</div> <div class="card">
<div translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div> <h1 class="text-center" translate>Warning!</h2>
<div class="right" ng-style="{'color':backgroundColor}" ng-show="!isDeletingWallet"> <div class="assertive padding" translate>Permanently delete this wallet. THIS ACTION CANNOT BE REVERSED</div>
<span ng-show="alias">{{alias}}</span>{{walletName}} <div class="text-center padding">
<span ng-show="alias">{{alias}}</span>{{walletName}}
</div>
</div> </div>
<button class="button button-block button-stable" ng-click="showDeletePopup()"translate>Delete wallet</button> <button class="button button-block button-assertive" ng-click="showDeletePopup()"translate>Delete</button>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -6,13 +6,19 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesEmailController" > <ion-content ng-controller="preferencesEmailController" >
<form name="emailForm" ng-submit="save(emailForm)" novalidate> <form name="emailForm" ng-submit="save(emailForm)" novalidate>
<label class="item item-input item-stacked-label"> <div class="card list">
<span class="input-label" transalate>Email for wallet notifications</span> <label class="item item-input item-stacked-label">
<input type="email" id="email" name="email" ng-model="email" required></input> <span class="input-label" transalate>Email for wallet notifications</span>
</label> <input type="email" id="email" name="email" ng-model="email" required></input>
<input type="submit" class="button button-block button-stable" value="{{'Save'|translate}}" ng-disabled="emailForm.$invalid"> </label>
</div>
<button type="submit"
class="button button-block button-positive"
ng-disabled="emailForm.$invalid" translate>
Save
</button>
</form> </form>
<div translate>Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include your wallet addresses and its balance, but no more. <div class="text-center" translate>Setting up email notifications could weaken your privacy, if the wallet service provider is compromised. Information available to an attacker would include your wallet addresses and its balance, but no more.
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -6,19 +6,17 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesFeeController" ng-init="init()"> <ion-content ng-controller="preferencesFeeController" ng-init="init()">
<div ng-show="loading"> <ion-radio ng-repeat="fee in feeLevels.livenet" ng-value="fee.level" ng-model="currentFeeLevel" ng-click="save(fee)">
<ion-spinner class="spinner-dark" icon="lines">Loading...</ion-spinner> {{feeOpts[fee.level]|translate}}
</div>
<ion-radio ng-repeat="fee in feeLevels.livenet" ng-value="fee.level" ng-model="currentFeeLevel" ng-click="save(fee)">{{feeOpts[fee.level]|translate}}
</ion-radio> </ion-radio>
<div ng-repeat="fee in feeLevels.livenet" ng-if="fee.level == currentFeeLevel"> <div class="padding text-center positive" ng-repeat="fee in feeLevels.livenet" ng-if="fee.level == currentFeeLevel">
<div ng-show="fee.nbBlocks"> <div ng-show="fee.nbBlocks">
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>. <span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>.
</div>
<span translate>Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB</span>
</div>
<div translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. Current fees are determined based on network load and the selected policy.
</div> </div>
<span translate>Current fee rate for this policy: {{fee.feePerKBUnit}}/kiB</span>
</div>
<div class="padding" translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. Current fees are determined based on network load and the selected policy.
</div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -6,7 +6,7 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()"> <ion-content ng-controller="preferencesHistory" ng-init="index.updatingTxHistory ? null : csvHistory()">
<div class="item item-divider"></div> <div class="item item-divider"></div>
<div class="item" ng-show="csvReady && !index.isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{index.alias || index.walletName}}.csv"> <div class="item" ng-show="csvReady && !index.isCordova" ng-csv="csvContent" csv-header="csvHeader" filename="Copay-{{wallet.name}}.csv">
<span translate>Export to file</span> <span translate>Export to file</span>
</div> </div>
<div class="item" ng-show="!csvReady && !index.isCordova"> <div class="item" ng-show="!csvReady && !index.isCordova">
@ -15,7 +15,7 @@
preparing... preparing...
</span> </span>
</div> </div>
<div class="item" ng-click="clearTransactionHistory()"> <div class="item assertive" ng-click="clearTransactionHistory()">
<span translate>Clear cache</span> <span translate>Clear cache</span>
</div> </div>
</ion-content> </ion-content>

View file

@ -6,9 +6,7 @@
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="preferencesInformation" ng-init="init()"> <ion-content ng-controller="preferencesInformation" ng-init="init()">
<div class="list"> <div class="list">
<div class="item item-divider"> <div class="item item-divider"></div>
Wallet Information
</div>
<div class="item" ng-click="saveBlack()"> <div class="item" ng-click="saveBlack()">
<span translate>Wallet Name (at creation)</span> <span translate>Wallet Name (at creation)</span>
<span class="item-note"> <span class="item-note">
@ -64,23 +62,23 @@
</span> </span>
</div> </div>
<div class="item item-divider"> <div ng-show="wallet.cachedStatus.wallet.copayers[0]" class="item item-divider">
Copayers Copayers
</div> </div>
<div class="item item-icon-right" ng-repeat="copayer in wallet.copayers"> <div class="item item-icon-right" ng-repeat="copayer in wallet.cachedStatus.wallet.copayers">
<span ng-show="copayer.id == wallet.copayerId" translate>{{copayer.name}} ({{'Me'|translate}})</span> {{copayer.name}}
<span ng-style="{'color': 'grey';}" ng-show="copayer.id != wallet.copayerId" translate>{{copayer.name}}</span> <span ng-show="copayer.id == wallet.copayerId">
<i class="icon ion-ios-checkmark-outline"></i> ({{'Me'|translate}})
</span>
</div> </div>
<div class="item item-divider"> <div class="item item-divider" translate>
Extended Public Keys Extended Public Keys
</div> </div>
<div class="item" ng-repeat="pk in pubKeys" copy-to-clipboard="pk"> <div class="item" ng-repeat="pk in pubKeys" copy-to-clipboard="pk">
<span translate>Copayer {{$index}}<</span> <span translate>Copayer {{$index}}</span>
<i class="icon ion-ios-checkmark-outline"></i>
<span class="item-note"> <span class="item-note">
<span>Copayer {{$index}}</span> <span>Copayer {{$index}}</span>
<span>{{pk}}</span> <span>{{pk}}</span>
@ -89,27 +87,27 @@
</div> </div>
<div ng-show="addrs"> <div ng-show="addrs">
<div class="item item-divider"> <div class="item item-divider" translate>
Last Wallet Addresses Last Wallet Addresses
</div> </div>
<div class="item" ng-repeat="a in addrs" class="oh" copy-to-clipboard="a.address"> <div class="item" ng-repeat="a in addrs" class="oh" copy-to-clipboard="a.address">
<span>{{a.address}}</span> <span>{{a.address}}</span>
<span>{{a.path}} &middot; {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }}</span> <span class="item-note">{{a.path}} &middot; {{a.createdOn *1000 | amDateFormat:'MMMM Do YYYY, h:mm a' }}</span>
<i class="icon ion-ios-checkmark-outline"></i>
</div> </div>
<div translate> <div class="padding text-center" translate>
Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time. Only Main (not change) addresses are shown. The addresses on this list were not verified locally at this time.
</div> </div>
<button class="button button-block button-positive" ng-click="scan()" translate> <button class="button button-block button-positive" ng-click="scan()" translate>
Scan addresses for funds Scan addresses for funds
</button> </button>
<button class="button button-block button-positive" ng-show="isCordova" ng-click="sendAddrs()" translate> <button class="button button-block button-positive" ng-show="isCordova" ng-click="sendAddrs()" translate>
Send addresses by email Send addresses by email
</button> </button>
</div>
<div ng-show="wallet.balanceByAddress" ng-if="wallet.balanceByAddress[0]"> <div ng-show="wallet.balanceByAddress[0]">
<div class="item item-divider"> <div class="item item-divider" translate>
Balance By Address Balance By Address
</div> </div>
<div class="item" ng-repeat="a in wallet.balanceByAddress" copy-to-clipboard="a.address"> <div class="item" ng-repeat="a in wallet.balanceByAddress" copy-to-clipboard="a.address">

View file

@ -83,7 +83,7 @@
<span class="toggle-label" translate>Use Unconfirmed Funds</span> <span class="toggle-label" translate>Use Unconfirmed Funds</span>
</ion-toggle> </ion-toggle>
<div class="item item-divider" translate>Wallets Settings</div> <div class="item item-divider" translate>Wallets Preferences</div>
<div class="item item-icon-left item-icon-right" href <div class="item item-icon-left item-icon-right" href
ui-sref="tabs.preferences.main({'walletId': item.id})" ui-sref="tabs.preferences.main({'walletId': item.id})"
ng-repeat="item in wallets track by $index"> ng-repeat="item in wallets track by $index">

View file

@ -2,7 +2,7 @@
angular.module('copayApp.controllers').controller('preferencesController', angular.module('copayApp.controllers').controller('preferencesController',
function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, fingerprintService, walletService) { function($scope, $rootScope, $timeout, $log, $stateParams, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, profileService, fingerprintService, walletService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Preferences')); $ionicNavBarDelegate.title(gettextCatalog.getString('Wallet Preferences'));
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);
var walletId = wallet.credentials.walletId; var walletId = wallet.credentials.walletId;
$scope.wallet = wallet; $scope.wallet = wallet;
@ -14,9 +14,6 @@ angular.module('copayApp.controllers').controller('preferencesController',
return $ionicHistory.goBack(); return $ionicHistory.goBack();
var config = configService.getSync(); var config = configService.getSync();
config.aliasFor = config.aliasFor || {};
$scope.alias = config.aliasFor[walletId] || wallet.credentials.walletName;
$scope.color = config.colorFor[walletId] || '#4A90E2';
$scope.encryptEnabled = walletService.isEncrypted(wallet); $scope.encryptEnabled = walletService.isEncrypted(wallet);
if (wallet.isPrivKeyExternal) if (wallet.isPrivKeyExternal)

View file

@ -8,9 +8,8 @@ angular.module('copayApp.controllers').controller('preferencesAliasController',
var walletId = wallet.credentials.walletId; var walletId = wallet.credentials.walletId;
var config = configService.getSync(); var config = configService.getSync();
config.aliasFor = config.aliasFor || {};
$scope.walletName = wallet.credentials.walletName; $scope.walletName = wallet.credentials.walletName;
$scope.alias = config.aliasFor[walletId] || wallet.walletName; $scope.alias = (config.aliasFor && config.aliasFor[walletId]) || wallet.walletName;
$scope.save = function() { $scope.save = function() {
var opts = { var opts = {

View file

@ -1,32 +1,17 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesDeleteWalletController', angular.module('copayApp.controllers').controller('preferencesDeleteWalletController',
function($scope, $ionicPopup, $stateParams, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) { function($scope, $stateParams, $ionicNavBarDelegate, $ionicHistory, gettextCatalog, lodash, profileService, $state, ongoingProcess, popupService) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Delete Wallet')); $ionicNavBarDelegate.title(gettextCatalog.getString('Delete'));
var wallet = profileService.getWallet($stateParams.walletId); var wallet = profileService.getWallet($stateParams.walletId);
$scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' '; $scope.alias = lodash.isEqual(wallet.name, wallet.credentials.walletName) ? null : wallet.name + ' ';
$scope.walletName = '[' + wallet.credentials.walletName + ']'; $scope.walletName = '[' + wallet.credentials.walletName + ']';
$scope.showDeletePopup = function() { $scope.showDeletePopup = function() {
var popup = $ionicPopup.show({ var title = gettextCatalog.getString('Warning!');
template: '<span>' + gettextCatalog.getString('Are you sure you want to delete this wallet?') + '</span>', var message = gettextCatalog.getString('Are you sure you want to delete this wallet?');
title: gettextCatalog.getString('Confirm'), popupService.showConfirm(title, message, function(res) {
buttons: [ if (res) deleteWallet();
{
text: gettextCatalog.getString('Cancel'),
onTap: function(e) {
popup.close();
}
},
{
text: gettextCatalog.getString('Accept'),
type: 'button-positive',
onTap: function(e) {
deleteWallet();
popup.close();
}
}
]
}); });
}; };

View file

@ -1,12 +1,12 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, feeService) { angular.module('copayApp.controllers').controller('preferencesFeeController', function($scope, $timeout, $ionicHistory, $ionicNavBarDelegate, gettextCatalog, configService, feeService, ongoingProcess) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Preferences fee')); $ionicNavBarDelegate.title(gettextCatalog.getString('Bitcoin Network Fee Policy'));
$scope.init = function() { $scope.init = function() {
$scope.loading = true; ongoingProcess.set('gettingFeeLevels', true);
feeService.getFeeLevels(function(levels) { feeService.getFeeLevels(function(levels) {
$scope.loading = false; ongoingProcess.set('gettingFeeLevels', false);
$scope.feeOpts = feeService.feeOpts; $scope.feeOpts = feeService.feeOpts;
$scope.currentFeeLevel = feeService.getCurrentFeeLevel(); $scope.currentFeeLevel = feeService.getCurrentFeeLevel();
$scope.feeLevels = levels; $scope.feeLevels = levels;
@ -29,7 +29,7 @@ angular.module('copayApp.controllers').controller('preferencesFeeController', fu
$ionicHistory.goBack(); $ionicHistory.goBack();
$timeout(function() { $timeout(function() {
$scope.$apply(); $scope.$apply();
}, 10); }, 100);
}); });
}; };
}); });

View file

@ -3,15 +3,14 @@
angular.module('copayApp.controllers').controller('preferencesHistory', angular.module('copayApp.controllers').controller('preferencesHistory',
function($scope, $log, $stateParams, $timeout, $ionicNavBarDelegate, gettextCatalog, storageService, $state, $ionicHistory, profileService, lodash) { function($scope, $log, $stateParams, $timeout, $ionicNavBarDelegate, gettextCatalog, storageService, $state, $ionicHistory, profileService, lodash) {
$ionicNavBarDelegate.title(gettextCatalog.getString('Transaction History')); $ionicNavBarDelegate.title(gettextCatalog.getString('Transaction History'));
var wallet = profileService.getWallet($stateParams.walletId); $scope.wallet = profileService.getWallet($stateParams.walletId);
var c = wallet.credentials;
$scope.csvReady = false; $scope.csvReady = false;
$scope.csvHistory = function(cb) { $scope.csvHistory = function(cb) {
var allTxs = []; var allTxs = [];
function getHistory(cb) { function getHistory(cb) {
storageService.getTxHistory(c.walletId, function(err, txs) { storageService.getTxHistory($scope.wallet.id, function(err, txs) {
if (err) return cb(err); if (err) return cb(err);
var txsFromLocal = []; var txsFromLocal = [];
@ -40,7 +39,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
var data = txs; var data = txs;
var satToBtc = 1 / 100000000; var satToBtc = 1 / 100000000;
$scope.csvContent = []; $scope.csvContent = [];
$scope.csvFilename = 'Copay-' + ($scope.alias || $scope.walletName) + '.csv'; $scope.csvFilename = 'Copay-' + $scope.wallet.name + '.csv';
$scope.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment']; $scope.csvHeader = ['Date', 'Destination', 'Description', 'Amount', 'Currency', 'Txid', 'Creator', 'Copayers', 'Comment'];
var _amount, _note, _copayers, _creator, _comment; var _amount, _note, _copayers, _creator, _comment;
@ -118,7 +117,7 @@ angular.module('copayApp.controllers').controller('preferencesHistory',
}; };
$scope.clearTransactionHistory = function() { $scope.clearTransactionHistory = function() {
storageService.removeTxHistory(c.walletId, function(err) { storageService.removeTxHistory($scope.wallet.id, function(err) {
if (err) { if (err) {
$log.error(err); $log.error(err);
return; return;

View file

@ -31,6 +31,7 @@ angular.module('copayApp.services').factory('ongoingProcess', function($log, $ti
'sweepingWallet': gettext('Sweeping Wallet...'), 'sweepingWallet': gettext('Sweeping Wallet...'),
'deletingWallet': gettext('Deleting Wallet...'), 'deletingWallet': gettext('Deleting Wallet...'),
'extractingWalletInfo': gettext('Extracting Wallet Information...'), 'extractingWalletInfo': gettext('Extracting Wallet Information...'),
'gettingFeeLevels': gettext('Getting fee levels...'),
}; };
root.clear = function() { root.clear = function() {

View file

@ -31,9 +31,9 @@ angular.module('copayApp.services')
root.updateWalletSettings = function(wallet) { root.updateWalletSettings = function(wallet) {
var defaults = configService.getDefaults(); var defaults = configService.getDefaults();
configService.whenAvailable(function(config){ configService.whenAvailable(function(config){
wallet.usingCustomBWS = config.bwsFor[wallet.id] && (config.bwsFor[wallet.id] != defaults.bws.url); wallet.usingCustomBWS = config.bwsFor && config.bwsFor[wallet.id] && (config.bwsFor[wallet.id] != defaults.bws.url);
wallet.name = config.aliasFor[wallet.id] || wallet.credentials.walletName; wallet.name = (config.aliasFor && config.aliasFor[wallet.id]) || wallet.credentials.walletName;
wallet.color = config.colorFor[wallet.id] || '#4A90E2'; wallet.color = (config.colorFor && config.colorFor[wallet.id]) || '#4A90E2';
wallet.email = config.emailFor && config.emailFor[wallet.id]; wallet.email = config.emailFor && config.emailFor[wallet.id];
}); });
} }