always USD on amazon and bpcard integrations amount views

This commit is contained in:
Gabriel Bazán 2016-12-27 12:34:48 -03:00
commit e2e5175d9c
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;