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;
|
toAmount = data.stateParams.toAmount;
|
||||||
cachedSendMax = {};
|
cachedSendMax = {};
|
||||||
|
$scope.showFeeFiat = false;
|
||||||
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
|
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
|
||||||
$scope.recipientType = data.stateParams.recipientType || null;
|
$scope.recipientType = data.stateParams.recipientType || null;
|
||||||
$scope.toAddress = data.stateParams.toAddress;
|
$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() {
|
var initConfirm = function() {
|
||||||
if ($scope.paypro) _paymentTimeControl($scope.paypro.expires);
|
if ($scope.paypro) _paymentTimeControl($scope.paypro.expires);
|
||||||
|
|
||||||
|
@ -147,6 +152,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
function resetValues() {
|
function resetValues() {
|
||||||
$scope.displayAmount = $scope.displayUnit = $scope.fee = $scope.alternativeAmountStr = $scope.insufficientFunds = $scope.noMatchingWallet = null;
|
$scope.displayAmount = $scope.displayUnit = $scope.fee = $scope.alternativeAmountStr = $scope.insufficientFunds = $scope.noMatchingWallet = null;
|
||||||
|
$scope.showFeeFiat = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getSendMaxInfo = function() {
|
$scope.getSendMaxInfo = function() {
|
||||||
|
@ -363,6 +369,9 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
function apply(txp) {
|
function apply(txp) {
|
||||||
$scope.fee = txFormatService.formatAmountStr(txp.fee);
|
$scope.fee = txFormatService.formatAmountStr(txp.fee);
|
||||||
|
txFormatService.formatAlternativeStr(txp.fee, function(v) {
|
||||||
|
$scope.feeFiat = v;
|
||||||
|
});
|
||||||
$scope.txp = txp;
|
$scope.txp = txp;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
|
@ -85,9 +85,8 @@
|
||||||
</a>
|
</a>
|
||||||
<div class="item single-line" ng-if="!insufficientFunds && !noMatchingWallet">
|
<div class="item single-line" ng-if="!insufficientFunds && !noMatchingWallet">
|
||||||
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
|
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
|
||||||
<span class="item-note">
|
<span ng-if="!showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{fee || '...'}}</span>
|
||||||
{{fee || '...'}}
|
<span ng-if="showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{feeFiat || '...'}}</span>
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-center" ng-show="noMatchingWallet">
|
<div class="text-center" ng-show="noMatchingWallet">
|
||||||
<span class="badge badge-energized" translate>No wallets available</span>
|
<span class="badge badge-energized" translate>No wallets available</span>
|
||||||
|
|
Loading…
Reference in New Issue