From 235e610d8495d03f626577c64c0aa9f25cd29239 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Wed, 30 Aug 2017 18:25:12 -0300 Subject: [PATCH] Fix coin to formatAmount --- src/js/services/walletService.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/js/services/walletService.js b/src/js/services/walletService.js index 9b375807c..5bf2c7597 100644 --- a/src/js/services/walletService.js +++ b/src/js/services/walletService.js @@ -414,14 +414,14 @@ angular.module('copayApp.services').factory('walletService', function($log, $tim var cacheCoin = txs[0].amountStr.split(' ')[1]; - if (cacheCoin == wallet.coin) - return; + if (cacheCoin == 'bits') { - $log.debug('Fixing Tx Cache Unit to: ' + wallet.coin) - lodash.each(txs, function(tx) { - tx.amountStr = txFormatService.formatAmountStr(wallet.coin, tx.amount); - tx.feeStr = txFormatService.formatAmountStr(wallet.coin, tx.fees); - }); + $log.debug('Fixing Tx Cache Unit to: ' + 'btc') + lodash.each(txs, function(tx) { + tx.amountStr = txFormatService.formatAmountStr('BTC', tx.amount); + tx.feeStr = txFormatService.formatAmountStr('BTC', tx.fees); + }); + } }; getSavedTxs(walletId, function(err, txsFromLocal) {