Adding support for API currencies
Since some altcoins are not listed with USD yet @vias79 suggested adding different API target currencies. This commit will add the feature and closes #201.
This commit is contained in:
parent
32cbab45d3
commit
4f3e1e9ccb
@ -23,7 +23,8 @@ define('SALT', 'PLEASEMAKEMESOMETHINGRANDOM');
|
||||
$config = array(
|
||||
'price' => array(
|
||||
'url' => 'https://btc-e.com/api/2',
|
||||
'target' => '/ltc_usd/ticker'
|
||||
'target' => '/ltc_usd/ticker',
|
||||
'currency' => 'USD' // Used in ministats template
|
||||
),
|
||||
'ap_threshold' => array(
|
||||
'min' => 1,
|
||||
|
||||
@ -39,6 +39,7 @@ $aGlobal = array(
|
||||
'blockexplorer' => $config['blockexplorer'],
|
||||
'chaininfo' => $config['chaininfo'],
|
||||
'config' => array(
|
||||
'price' => array( 'currency' => $config['price']['currency'] ),
|
||||
'targetdiff' => $config['difficulty'],
|
||||
'currency' => $config['currency'],
|
||||
'txfee' => $config['txfee'],
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div id="ministats">
|
||||
<table border="0">
|
||||
<tr>
|
||||
<td><li>{$GLOBAL.config.currency}/usd: {$GLOBAL.price|default:"n/a"|number_format:"4"} </li></td>
|
||||
<td><li>{$GLOBAL.config.currency}/{$GLOBAL.config.price.currency}: {$GLOBAL.price|default:"n/a"|number_format:"4"} </li></td>
|
||||
<td><li>Pool Hashrate: {($GLOBAL.hashrate / 1000)|number_format:"3"} MH/s </li></td>
|
||||
<td><li>Pool Sharerate: {$GLOBAL.sharerate|number_format:"2"} Shares/s </li></td>
|
||||
<td><li>Pool Workers: {$GLOBAL.workers} </li></td>
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<th align="left" scope="col">User Name</th>
|
||||
<th class="right" scope="col">KH/s</th>
|
||||
<th class="right">{$GLOBAL.config.currency}/Day</th>
|
||||
<th class="right">USD/Day</th>
|
||||
<th class="right">{$GLOBAL.config.price.currency}/Day</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user