removed currencySymbolService and it's references

This commit is contained in:
Sebastiaan Pasma 2018-07-30 15:25:52 +02:00
commit ed291b1ac5
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
3 changed files with 9 additions and 209 deletions

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, currencySymbolService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) {
angular.module('copayApp.controllers').controller('walletDetailsController', function($scope, $rootScope, $interval, $timeout, $filter, $log, $ionicModal, $ionicPopover, $state, $stateParams, $ionicHistory, profileService, lodash, configService, platformInfo, walletService, txpModalService, externalLinkService, popupService, addressbookService, storageService, $ionicScrollDelegate, $window, bwcError, gettextCatalog, timeService, feeService, appConfigService, rateService) {
var HISTORY_SHOW_LIMIT = 10;
var currentTxHistoryPage = 0;
@ -256,11 +256,6 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
return !tx.confirmations || tx.confirmations === 0;
};
$scope.currencySymbol = function(code) {
var symbol = currencySymbolService.getCurrencySymbol(code);
return symbol?symbol:"";
};
$scope.showMore = function() {
$timeout(function() {
currentTxHistoryPage++;

View file

@ -1,195 +0,0 @@
'use strict';
angular.module('copayApp.services').factory('currencySymbolService', function($log) {
var root = {};
root.currencySymbols = {
'AED': 'د.إ',
'AFN': '؋',
'ALL': 'L',
'AMD': '֏',
'ANG': 'ƒ',
'AOA': 'Kz',
'ARS': '$',
'AUD': '$',
'AWG': 'ƒ',
'AZN': '₼',
'BAM': 'KM',
'BBD': '$',
'BDT': '৳',
'BGN': 'лв',
'BHD': '.د.ب',
'BIF': 'FBu',
'BMD': '$',
'BND': '$',
'BOB': '$b',
'BRL': 'R$',
'BSD': '$',
'BTC': '฿',
'BTN': 'Nu.',
'BWP': 'P',
'BYR': 'Br',
'BYN': 'Br',
'BZD': 'BZ$',
'CAD': '$',
'CDF': 'FC',
'CHF': 'CHF',
'CLP': '$',
'CNY': '¥',
'COP': '$',
'CRC': '₡',
'CUC': '$',
'CUP': '₱',
'CVE': '$',
'CZK': 'Kč',
'DJF': 'Fdj',
'DKK': 'kr',
'DOP': 'RD$',
'DZD': 'دج',
'EEK': 'kr',
'EGP': '£',
'ERN': 'Nfk',
'ETB': 'Br',
'ETH': 'Ξ',
'EUR': '€',
'FJD': '$',
'FKP': '£',
'GBP': '£',
'GEL': '₾',
'GGP': '£',
'GHC': '₵',
'GHS': 'GH₵',
'GIP': '£',
'GMD': 'D',
'GNF': 'FG',
'GTQ': 'Q',
'GYD': '$',
'HKD': '$',
'HNL': 'L',
'HRK': 'kn',
'HTG': 'G',
'HUF': 'Ft',
'IDR': 'Rp',
'ILS': '₪',
'IMP': '£',
'INR': '₹',
'IQD': 'ع.د',
'IRR': '﷼',
'ISK': 'kr',
'JEP': '£',
'JMD': 'J$',
'JOD': 'JD',
'JPY': '¥',
'KES': 'KSh',
'KGS': 'лв',
'KHR': '៛',
'KMF': 'CF',
'KPW': '₩',
'KRW': '₩',
'KWD': 'KD',
'KYD': '$',
'KZT': 'лв',
'LAK': '₭',
'LBP': '£',
'LKR': '₨',
'LRD': '$',
'LSL': 'M',
'LTC': 'Ł',
'LTL': 'Lt',
'LVL': 'Ls',
'LYD': 'LD',
'MAD': 'MAD',
'MDL': 'lei',
'MGA': 'Ar',
'MKD': 'ден',
'MMK': 'K',
'MNT': '₮',
'MOP': 'MOP$',
'MRO': 'UM',
'MRU': 'UM',
'MUR': '₨',
'MVR': 'Rf',
'MWK': 'MK',
'MXN': '$',
'MYR': 'RM',
'MZN': 'MT',
'NAD': '$',
'NGN': '₦',
'NIO': 'C$',
'NOK': 'kr',
'NPR': '₨',
'NZD': '$',
'OMR': '﷼',
'PAB': 'B/.',
'PEN': 'S/.',
'PGK': 'K',
'PHP': '₱',
'PKR': '₨',
'PLN': 'zł',
'PYG': 'Gs',
'QAR': '﷼',
'RMB': '¥',
'RON': 'lei',
'RSD': 'Дин.',
'RUB': '₽',
'RWF': 'R₣',
'SAR': '﷼',
'SBD': '$',
'SCR': '₨',
'SDG': 'ج.س.',
'SEK': 'kr',
'SGD': '$',
'SHP': '£',
'SLL': 'Le',
'SOS': 'S',
'SRD': '$',
'SSP': '£',
'STD': 'Db',
'STN': 'Db',
'SVC': '$',
'SYP': '£',
'SZL': 'E',
'THB': '฿',
'TJS': 'SM',
'TMT': 'T',
'TND': 'د.ت',
'TOP': 'T$',
'TRL': '₤',
'TRY': '₺',
'TTD': 'TT$',
'TVD': '$',
'TWD': 'NT$',
'TZS': 'TSh',
'UAH': '₴',
'UGX': 'USh',
'USD': '$',
'UYU': '$U',
'UZS': 'лв',
'VEF': 'Bs',
'VND': '₫',
'VUV': 'VT',
'WST': 'WS$',
'XAF': 'FCFA',
'XBT': 'Ƀ',
'XCD': '$',
'XOF': 'CFA',
'XPF': '₣',
'YER': '﷼',
'ZAR': 'R',
'ZWD': 'Z$'
};
root.getCurrencySymbol = function(code) {
if (!code) return false;
code = code.toUpperCase();
if (root.currencySymbols[code]) {
return root.currencySymbols[code];
}
$log.debug("Currency symbol for "+code+" not found");
return false;
};
return root;
});

View file

@ -34,7 +34,7 @@
on-hold="hideToggle()"
ng-style="{'transform': amountScale}"
ng-class="{amount__balance: amountIsCollapsible}">
<strong class="size-25">{{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
<strong class="size-25">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
<div
class="size-14 amount-alternative"
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
@ -53,7 +53,7 @@
class="size-14 amount-alternative"
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
ng-style="{opacity: altAmountOpacity}">
{{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
</div>
</div>
@ -86,7 +86,7 @@
</strong>
&nbsp;
<span>
{{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
</span>
</button>
</div>
@ -148,7 +148,7 @@
class="size-14 amount-alternative"
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
ng-style="{opacity: altAmountOpacity}">
{{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}
</div>
</div>
@ -158,7 +158,7 @@
on-hold="hideToggle()"
ng-style="{'transform': amountScale}"
ng-class="{amount__balance: amountIsCollapsible}">
<strong class="size-25">{{currencySymbol(status.alternativeIsoCode)}} {{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
<strong class="size-25">{{status.totalBalanceAlternative}} {{status.alternativeIsoCode}}</strong>
<div
class="size-16 amount-alternative"
ng-if="status.totalBalanceAlternative && wallet.network == 'livenet'"
@ -196,7 +196,7 @@
</strong>
&nbsp;
<span>
{{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
</span>
</button>
</div>
@ -205,7 +205,7 @@
<button class="button button-standard button-primary amount__button-balance size-14" ng-click="openBalanceModal()">
<i class="icon ion-ios-checkmark-outline"></i>
<strong>
{{currencySymbol(status.alternativeIsoCode)}} {{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
{{status.spendableBalanceAlternative}} {{status.alternativeIsoCode}}
</strong>
&nbsp;
<span>
@ -267,7 +267,7 @@
<div class="item item-footer description" ng-show="status.lockedBalanceSat" style="background: white;">
<span translate>Total Locked Balance</span>:
<b>{{status.lockedBalanceStr}} </b>
<span> {{currencySymbol(status.alternativeIsoCode)}} {{status.lockedBalanceAlternative}} {{status.alternativeIsoCode}} </span>
<span> {{status.lockedBalanceAlternative}} {{status.alternativeIsoCode}} </span>
</div>
</div>