Update Currency

This commit is contained in:
Sky Young 2018-05-18 16:31:07 -07:00
parent c7aa861a3b
commit e83a99ae96
3 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ angular.module('flosight.currency').controller('CurrencyController',
if (this.symbol === 'USD') { if (this.symbol === 'USD') {
response = _roundFloat((value * this.factor), 2); response = _roundFloat((value * this.factor), 2);
} else if (this.symbol === 'mBTC') { } else if (this.symbol === 'mFLO') {
this.factor = 1000; this.factor = 1000;
response = _roundFloat((value * this.factor), 5); response = _roundFloat((value * this.factor), 5);
} else if (this.symbol === 'bits') { } else if (this.symbol === 'bits') {
@ -47,7 +47,7 @@ angular.module('flosight.currency').controller('CurrencyController',
Currency.get({}, function(res) { Currency.get({}, function(res) {
$rootScope.currency.factor = $rootScope.currency.bitstamp = res.data.bitstamp; $rootScope.currency.factor = $rootScope.currency.bitstamp = res.data.bitstamp;
}); });
} else if (currency === 'mBTC') { } else if (currency === 'mFLO') {
$rootScope.currency.factor = 1000; $rootScope.currency.factor = 1000;
} else if (currency === 'bits') { } else if (currency === 'bits') {
$rootScope.currency.factor = 1000000; $rootScope.currency.factor = 1000000;

View File

@ -7,7 +7,7 @@ angular.module('flosight.system').controller('HeaderController',
$rootScope.currency = { $rootScope.currency = {
factor: 1, factor: 1,
bitstamp: 0, bitstamp: 0,
symbol: 'BTC' symbol: 'FLO'
}; };
$scope.menu = [{ $scope.menu = [{

View File

@ -6,10 +6,10 @@
<a data-ng-click="setCurrency('USD')" data-ng-class="{active: currency.symbol == 'USD'}">USD</a> <a data-ng-click="setCurrency('USD')" data-ng-class="{active: currency.symbol == 'USD'}">USD</a>
</li> </li>
<li> <li>
<a data-ng-click="setCurrency('BTC')" data-ng-class="{active: currency.symbol == 'BTC'}">BTC</a> <a data-ng-click="setCurrency('FLO')" data-ng-class="{active: currency.symbol == 'FLO'}">FLO</a>
</li> </li>
<li> <li>
<a data-ng-click="setCurrency('mBTC')" data-ng-class="{active: currency.symbol == 'mBTC'}">mBTC</a> <a data-ng-click="setCurrency('mFLO')" data-ng-class="{active: currency.symbol == 'mFLO'}">mFLO</a>
</li> </li>
<li> <li>
<a data-ng-click="setCurrency('bits')" data-ng-class="{active: currency.symbol == 'bits'}">bits</a> <a data-ng-click="setCurrency('bits')" data-ng-class="{active: currency.symbol == 'bits'}">bits</a>