Merge pull request #2940 from matiu/feat/emergency-fee

Feat/emergency fee
This commit is contained in:
Gustavo Maximiliano Cortez 2015-06-30 18:26:56 -03:00
commit e40f0fa90e
4 changed files with 16 additions and 4 deletions

View file

@ -7,8 +7,16 @@
<div class="content preferences" ng-controller="preferencesFeeController as prefFee">
<div ng-repeat="fee in prefFee.feeOpts" ng-click="prefFee.save(fee)" class="line-b p20 size-14">
<span>{{fee.name|translate}} (<span translate>{{fee.value}} bits per kB</span>)</span>
<span ng-if="fee.red" style="color:red">{{fee.name|translate}} (<span translate>{{fee.value}} bits per kB</span>)</span>
<span ng-if="!fee.red">{{fee.name|translate}} (<span translate>{{fee.value}} bits per kB</span>)</span>
<i class="fi-check size-16 right" ng-show="prefFee.feeName == fee.name"></i>
</div>
<div class="row column m20t">
<div class="text-gray size-12 text-center m20b" 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. The Emergency level should only be used when there is a network congestion.
</div>
</div>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -178,7 +178,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
//prefs.email (may come from arguments)
prefs.language = self.defaultLanguageIsoCode;
prefs.unit = self.unitName;
prefs.unit = self.unitName.toLowerCase();
var clients = [];
if (opts.saveAll) {

View file

@ -13,7 +13,11 @@ angular.module('copayApp.controllers').controller('preferencesFeeController',
}, {
name: gettext('Economy'),
value: 10,
}];
}, {
name: gettext('Emergency'),
red: true,
value: 500,
}, ];
this.save = function(newFee) {
var opts = {

View file

@ -6,7 +6,7 @@ angular.module('copayApp.services')
root.expireAddress = function(walletId,cb) {
$log.debug('Cleaning Address ' + addr );
$log.debug('Cleaning Address ' + walletId );
storageService.clearLastAddress(walletId, function(err) {
return cb(err);
});