diff --git a/src/js/controllers/modals/txpDetails.js b/src/js/controllers/modals/txpDetails.js index 01ab9277b..b59c11897 100644 --- a/src/js/controllers/modals/txpDetails.js +++ b/src/js/controllers/modals/txpDetails.js @@ -16,11 +16,21 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi $scope.data = {}; $scope.displayAmount = getDisplayAmount($scope.tx.amountStr); $scope.displayUnit = getDisplayUnit($scope.tx.amountStr); + displayFeeValues(); initActionList(); checkPaypro(); applyButtonText(); }; + function displayFeeValues() { + txFormatService.formatAlternativeStr($scope.tx.fee, function(v) { + $scope.tx.feeFiatStr = v; + }); + $scope.tx.feeRateStr = ($scope.tx.fee / ($scope.tx.amount + $scope.tx.fee) * 100).toFixed(2) + '%'; + if ($scope.tx.feeLevel == 'superEconomy') $scope.tx.feeLevelStr = gettextCatalog.getString('Super Economy'); + else $scope.tx.feeLevelStr = $scope.tx.feeLevelStr = $scope.tx.feeLevel.charAt(0).toUpperCase() + $scope.tx.feeLevel.slice(1); + }; + function applyButtonText() { $scope.buttonText = $scope.isCordova ? gettextCatalog.getString('Slide') + ' ' : gettextCatalog.getString('Click') + ' '; diff --git a/src/sass/views/includes/txp-details.scss b/src/sass/views/includes/txp-details.scss index d08087180..c68841a4c 100644 --- a/src/sass/views/includes/txp-details.scss +++ b/src/sass/views/includes/txp-details.scss @@ -5,7 +5,12 @@ $item-vertical-padding: 10px; $item-border-color: #EFEFEF; $item-label-color: #6C6C6E; - + .item-note { + float: none; + .fee-rate { + display: inline-block; + } + } .list { background: #f5f5f5; } @@ -107,7 +112,7 @@ margin-top: 5px; font-size: 14px; color: $item-label-color; - } + } .item-divider { padding-top: 1.2rem; color: $item-label-color; diff --git a/www/views/modals/txp-details.html b/www/views/modals/txp-details.html index d18128132..a093ba441 100644 --- a/www/views/modals/txp-details.html +++ b/www/views/modals/txp-details.html @@ -97,10 +97,11 @@ {{tx.message}} -
- Fee - - {{tx.feeStr}} +
+ {{'Fee:' | translate}} {{tx.feeLevelStr | translate}} + {{tx.feeStr || '...'}} + + {{tx.feeFiatStr || '...'}} - {{tx.feeRateStr}} of the transaction