mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5657 from JDonadio/ref/fee-fiat
Show fee in fiat - Confirm view
This commit is contained in:
commit
f6ca41851e
|
@ -13,6 +13,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
|
||||
toAmount = data.stateParams.toAmount;
|
||||
cachedSendMax = {};
|
||||
$scope.showFeeFiat = false;
|
||||
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
|
||||
$scope.recipientType = data.stateParams.recipientType || null;
|
||||
$scope.toAddress = data.stateParams.toAddress;
|
||||
|
@ -124,6 +125,10 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
});
|
||||
};
|
||||
|
||||
$scope.toggleFeeValue = function() {
|
||||
$scope.showFeeFiat = !$scope.showFeeFiat;
|
||||
};
|
||||
|
||||
var initConfirm = function() {
|
||||
if ($scope.paypro) _paymentTimeControl($scope.paypro.expires);
|
||||
|
||||
|
@ -147,6 +152,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
|
||||
function resetValues() {
|
||||
$scope.displayAmount = $scope.displayUnit = $scope.fee = $scope.alternativeAmountStr = $scope.insufficientFunds = $scope.noMatchingWallet = null;
|
||||
$scope.showFeeFiat = false;
|
||||
};
|
||||
|
||||
$scope.getSendMaxInfo = function() {
|
||||
|
@ -363,6 +369,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
|||
|
||||
function apply(txp) {
|
||||
$scope.fee = txFormatService.formatAmountStr(txp.fee);
|
||||
txFormatService.formatAlternativeStr(txp.fee, function(v) {
|
||||
$scope.feeFiat = v;
|
||||
});
|
||||
$scope.txp = txp;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
|
|
|
@ -85,9 +85,8 @@
|
|||
</a>
|
||||
<div class="item single-line" ng-if="!insufficientFunds && !noMatchingWallet">
|
||||
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
|
||||
<span class="item-note">
|
||||
{{fee || '...'}}
|
||||
</span>
|
||||
<span ng-if="!showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{fee || '...'}}</span>
|
||||
<span ng-if="showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{feeFiat || '...'}}</span>
|
||||
</div>
|
||||
<div class="text-center" ng-show="noMatchingWallet">
|
||||
<span class="badge badge-energized" translate>No wallets available</span>
|
||||
|
|
Loading…
Reference in New Issue