Skip to content

Commit

Permalink
isEth bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKo7v committed Mar 5, 2018
1 parent fbe2ca0 commit 0121c41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/lib/ethplorer.php
Original file line number Diff line number Diff line change
Expand Up @@ -1146,14 +1146,15 @@ public function getLastTransfers(array $options = array(), $showEth = FALSE){

if(isset($options['token']) && isset($options['history'])){
$search['contract'] = $options['token'];
}elseif(!$showEth){
$search['contract'] = array('$ne' => 'ETH');
}

$sort = array("timestamp" => -1);

if(isset($options['timestamp']) && ($options['timestamp'] > 0)){
$search['timestamp'] = array('$gt' => $options['timestamp']);
}
if(!$showEth) $search['contract'] = array('$ne' => 'ETH');
$limit = isset($options['limit']) ? (int)$options['limit'] : false;
$cursor = $this->oMongo->find('operations', $search, $sort, $limit);

Expand Down

0 comments on commit 0121c41

Please sign in to comment.