added bitcoin and bitcoin cash aliases to config and use them everywhere
This commit is contained in:
parent
a358ea69f3
commit
a730c8e2d2
9 changed files with 41 additions and 12 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue