mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-09-30 15:20:36 +00:00
for the test, i added (manually) a market record named "c-cex LTC" with base_coin set to "LTC", you may have to disable any BTC market(s) for the coin In this case, the coin BTC price/balance is computed, based on LTC price, even if the database coin "BTC price" is under 1 sat. require LTC to be enabled or... "watched" to also update LTC/BTC price implemented for cryptopia, nova and c-cex, not bleutrade (DOGE only) + various small log fixes..
41 lines
602 B
PHP
41 lines
602 B
PHP
<?php
|
|
|
|
class db_markets extends CActiveRecord
|
|
{
|
|
public static function model($className=__CLASS__)
|
|
{
|
|
return parent::model($className);
|
|
}
|
|
|
|
public function tableName()
|
|
{
|
|
return 'markets';
|
|
}
|
|
|
|
public function rules()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
|
|
public function relations()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
|
|
public function attributeLabels()
|
|
{
|
|
return array(
|
|
);
|
|
}
|
|
|
|
public function save($runValidation=true,$attributes=null)
|
|
{
|
|
if (empty($this->base_coin)) $this->base_coin = null;
|
|
if (empty($this->message)) $this->message = null;
|
|
|
|
return parent::save($runValidation, $attributes);
|
|
}
|
|
}
|
|
|