Skip to content

Commit

Permalink
Updated importing of workaround functions as they are imported by Com…
Browse files Browse the repository at this point in the history
…poser
owenvoke committed Oct 19, 2017
1 parent ce0a1be commit 7b16cf5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/Ethereum.php
Original file line number Diff line number Diff line change
@@ -159,11 +159,9 @@ public function __construct($url)
$this->debug('Final request params', $request_params);
$value = $this->etherRequest($method, $request_params);

// Workaround varying client implementations.
$workaround_file = substr(__DIR__, 0, -3) . 'workarounds/' . $method . '.php';
if (file_exists($workaround_file)) {
require_once $workaround_file;
$value = call_user_func('eth_workaround_' . $method, $value);
$functionName = 'eth_workaround_' . $method;
if (function_exists($functionName)) {
$value = call_user_func($functionName, $value);
}

$return = $this->createReturnValue($value, $return_type_class, $method);

0 comments on commit 7b16cf5

Please sign in to comment.