Parse fee correctly

This commit is contained in:
Sky Young 2018-05-22 14:22:05 -07:00
parent 19c60d111d
commit 51cc30532d
3 changed files with 17 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{
"name": "flosight-ui",
"description": "An open-source frontend for the Flosight API. The Flosight API provides you with a convenient, powerful and simple way to query and broadcast data on the florincoin network and build your own services with it.",
"version": "5.0.0-beta.70",
"version": "5.0.0-beta.71",
"repository": "git://github.com/bitpay/flosight-ui.git",
"bugs": {
"url": "https://github.com/bitpay/flosight-ui/issues"

View File

@ -19,7 +19,20 @@ angular.module('flosight.currency').controller('CurrencyController',
var response;
if (this.symbol === 'USD') {
response = _roundFloat((value * this.factor), 2);
var USDValue = value * this.factor;
response = USDValue.toFixed(2)
if (parseFloat(response) === 0)
response = USDValue.toFixed(4)
if (parseFloat(response) === 0)
response = USDValue.toFixed(6)
if (parseFloat(response) === 0)
response = USDValue.toFixed(8)
if (parseFloat(response) === 0)
response = 0;
} else if (this.symbol === 'mFLO') {
this.factor = 1000;
response = _roundFloat((value * this.factor), 5);

View File

@ -200,13 +200,13 @@
<div class="line-top row" data-ng-hide="!tx">
<div class="col-xs-6 col-sm-4 col-md-4">
<span data-ng-show="!tx.isCoinBase && !isNaN(parseFloat(tx.fees))"
class="txvalues txvalues-default"><span translate>Fee</span>: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'BTC'}} </span>
class="txvalues txvalues-default"><span translate>Fee</span>: {{$root.currency.getConvertion(tx.fees) || tx.fees + 'FLO'}} </span>
</div>
<div class="col-xs-6 col-sm-8 col-md-8 text-right">
<span data-ng-show="tx.confirmations" class="txvalues
txvalues-success">{{tx.confirmations}} <span translate>Confirmations</span></span>
<span data-ng-show="!tx.confirmations" class="txvalues txvalues-danger" translate>Unconfirmed Transaction!</span>
<span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' BTC' }}</span>
<span class="txvalues txvalues-primary">{{$root.currency.getConvertion(tx.valueOut) || tx.valueOut + ' FLO' }}</span>
</div>
</div>
<div class="line-top row" style="margin-top: 15px;" data-ng-hide="tx.floData === ''">