Skip to content

Commit

Permalink
Missing operations bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemKo7v committed Feb 24, 2017
1 parent f4ffe0c commit a4d6761
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions service/lib/ethplorer.php
Original file line number Diff line number Diff line change
Expand Up @@ -388,17 +388,17 @@ public function getTransactionDetails($hash){
if($token = $this->getToken($tokenAddr)){
$result['token'] = $token;
}
$result["operations"] = $this->getOperations($hash);
if(is_array($result["operations"]) && count($result["operations"])){
foreach($result["operations"] as $idx => $operation){
if($result["operations"][$idx]['contract'] !== $tx["to"]){
$result["contracts"][] = $operation['contract'];
}
if($token = $this->getToken($operation['contract'])){
$result['token'] = $token;
$result["operations"][$idx]['type'] = ucfirst($operation['type']);
$result["operations"][$idx]['token'] = $token;
}
}
$result["operations"] = $this->getOperations($hash);
if(is_array($result["operations"]) && count($result["operations"])){
foreach($result["operations"] as $idx => $operation){
if($result["operations"][$idx]['contract'] !== $tx["to"]){
$result["contracts"][] = $operation['contract'];
}
if($token = $this->getToken($operation['contract'])){
$result['token'] = $token;
$result["operations"][$idx]['type'] = ucfirst($operation['type']);
$result["operations"][$idx]['token'] = $token;
}
}
}
Expand Down

0 comments on commit a4d6761

Please sign in to comment.