Merge pull request #5350 from gabrielbazan7/fix/integcurrencies

always USD on amazon and bpcard integrations amount views
This commit is contained in:
Gustavo Maximiliano Cortez 2016-12-27 16:58:27 -03:00 committed by GitHub
commit 489c9513e6
2 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
var config = configService.getSync().wallet.settings;
$scope.unitName = config.unitName;
$scope.alternativeIsoCode = config.alternativeIsoCode;
$scope.alternativeIsoCode = !!$scope.cardId || !!$scope.isGiftCard ? 'USD' : config.alternativeIsoCode;
$scope.specificAmount = $scope.specificAlternativeAmount = '';
$scope.isCordova = platformInfo.isCordova;
unitToSatoshi = config.unitToSatoshi;
@ -304,7 +304,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
try {
uuid = profileService.getWallets({
onlyComplete: true,
network: 'livenet',
network: amazonService.getEnvironment(),
})[0].id;
} catch (err) {
ongoingProcess.set('Preparing transaction...', false);

View File

@ -135,6 +135,8 @@ angular.module('copayApp.controllers').controller('confirmController', function(
$scope.displayUnit = getDisplayUnit($scope.amountStr);
if ($scope.cardAmountUSD) {
$scope.alternativeAmountStr = $filter('formatFiatAmount')($scope.cardAmountUSD) + ' USD';
} else if ($scope.giftCardAmountUSD) {
$scope.alternativeAmountStr = $filter('formatFiatAmount')($scope.giftCardAmountUSD) + ' USD';
} else {
txFormatService.formatAlternativeStr(toAmount, function(v) {
$scope.alternativeAmountStr = v;