From 4e49989d24c2377374d2741496f604f88425a2fb Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 6 Feb 2014 18:09:50 -0300 Subject: [PATCH] Currency support on address pages and missing places --- public/js/controllers/footer.js | 4 +--- public/views/address.html | 6 +++--- public/views/transaction.html | 6 +++--- public/views/transaction/tx.html | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/public/js/controllers/footer.js b/public/js/controllers/footer.js index 64c0f2d..28744bc 100644 --- a/public/js/controllers/footer.js +++ b/public/js/controllers/footer.js @@ -4,9 +4,7 @@ angular.module('insight.system').controller('FooterController', function($rootScope, $scope, Version, Currency) { var _roundFloat = function(x, n) { - if(!parseInt(n, 10)) n = 0; - - if(!parseFloat(x)) return false; + if(!parseInt(n, 10) || !parseFloat(x)) n = 0; return Math.round(x * Math.pow(10, n)) / Math.pow(10, n); }; diff --git a/public/views/address.html b/public/views/address.html index 0f4822e..9dfd80d 100644 --- a/public/views/address.html +++ b/public/views/address.html @@ -16,15 +16,15 @@ Total Received - {{address.totalReceived}} BTC + {{$root.currency.getConversion(address.totalReceived)}} Total Sent - {{address.totalSent}} BTC + {{$root.currency.getConversion(address.totalSent)}} Final Balance - {{address.balance}} BTC + {{$root.currency.getConversion(address.balance)}} No. Transactions diff --git a/public/views/transaction.html b/public/views/transaction.html index 6f786dc..3f83dd7 100644 --- a/public/views/transaction.html +++ b/public/views/transaction.html @@ -43,15 +43,15 @@ Total Input - {{tx.valueIn}} BTC + {{$root.currency.getConversion(tx.valueIn)}} Total Output - {{tx.valueOut}} BTC + {{$root.currency.getConversion(tx.valueOut)}} Fees - {{tx.fees}} BTC + {{$root.currency.getConversion(tx.fees)}} diff --git a/public/views/transaction/tx.html b/public/views/transaction/tx.html index d1a3f03..154dca2 100644 --- a/public/views/transaction/tx.html +++ b/public/views/transaction/tx.html @@ -109,7 +109,7 @@
- +