added bitcoin and bitcoin cash aliases to config and use them everywhere

This commit is contained in:
Kadir Sekha 2017-11-01 16:26:42 +09:00
commit a730c8e2d2
9 changed files with 41 additions and 12 deletions

View file

@ -18,8 +18,13 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
};
root.formatAmountStr = function(coin, satoshis) {
var defaults = configService.getDefaults();
var configCache = configService.getSync();
var c = coin == 'btc' ? (configCache.bitcoinAlias || defaults.bitcoinAlias)
: (configCache.bitcoinCashAlias || defaults.bitcoinCashAlias);
if (isNaN(satoshis)) return;
return root.formatAmount(satoshis) + ' ' + (coin).toUpperCase();
return root.formatAmount(satoshis) + ' ' + (c).toUpperCase();
};
root.toFiat = function(coin, satoshis, code, cb) {