Adds more fee data to the confirmation popup

This commit is contained in:
Gustavo Maximiliano Cortez 2016-02-29 18:14:47 -03:00
commit 82bcfd8d30
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
4 changed files with 22 additions and 5 deletions

View file

@ -1,6 +1,16 @@
'use strict';
angular.module('copayApp.controllers').controller('confirmTxController', function() {
angular.module('copayApp.controllers').controller('confirmTxController', function(configService, feeService, rateService) {
this.processFee = function(amount, fee) {
var walletSettings = configService.getSync().wallet.settings;
var feeAlternativeIsoCode = walletSettings.alternativeIsoCode;
this.feeLevel = feeService.feeOpts[feeService.getCurrentFeeLevel()];
this.feeAlternativeStr = parseFloat((rateService.toFiat(fee, feeAlternativeIsoCode)).toFixed(2), 10) + ' ' + feeAlternativeIsoCode;
this.feeRateStr = (fee / amount * 100).toFixed(2) + '%' ;
};
this.close = function(cb) {
return cb();

View file

@ -15,7 +15,6 @@ angular.module('copayApp.controllers').controller('txController',
this.copayerId = fc.credentials.copayerId;
this.isShared = fc.credentials.n > 1;
if (isCordova) {
$rootScope.modalOpened = true;
var self = this;