Fix symbols

This commit is contained in:
Gustavo Maximiliano Cortez 2017-06-05 10:37:35 -03:00
parent e0eb06156e
commit ce8c8d41fc
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 5 additions and 7 deletions

View File

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('topUpController', function($scope, $log, $state, $timeout, $ionicHistory, $ionicConfig, $sce, lodash, popupService, profileService, ongoingProcess, walletService, configService, platformInfo, bitpayService, bitpayCardService, payproService, bwcError, txFormatService, sendMaxService) {
angular.module('copayApp.controllers').controller('topUpController', function($scope, $log, $state, $timeout, $ionicHistory, $ionicConfig, lodash, popupService, profileService, ongoingProcess, walletService, configService, platformInfo, bitpayService, bitpayCardService, payproService, bwcError, txFormatService, sendMaxService) {
var amount;
var currency;
@ -95,14 +95,13 @@ angular.module('copayApp.controllers').controller('topUpController', function($s
var code;
switch(currencyCode) {
case 'EUR':
code = '€';
$scope.currencySymbol = '€';
break;
case 'GBP':
code = '£';
$scope.currencySymbol = ';
break;
default : code = '$';
default : $scope.currencySymbol = '$';
};
$scope.htmlCurrencyCode = $sce.trustAsHtml(code);
bitpayCardService.getRates(currencyCode, function(err, data) {
if (err) $log.error(err);
$scope.rate = data.rate;

View File

@ -20,8 +20,7 @@
<div class="amount-final">{{amountUnitStr}}</div>
<div class="alternative">
<span ng-if="rate">@
<span ng-bind-html="htmlCurrencyCode"></span>
{{rate | currency:' ':2}} per BTC</span>
{{rate | currency:currencySymbol:2}} per BTC</span>
<span ng-if="!rate">...</span>
</div>
</div>