Eth gasPrice output formatter.

This commit is contained in:
sc0Vu 2018-01-12 15:45:20 +08:00
parent 04c5ac24f6
commit 828f554eb6
2 changed files with 5 additions and 2 deletions

View File

@ -13,6 +13,7 @@ namespace Web3\Methods\Eth;
use InvalidArgumentException;
use Web3\Methods\EthMethod;
use Web3\Formatters\BigNumberFormatter;
class GasPrice extends EthMethod
{
@ -35,7 +36,9 @@ class GasPrice extends EthMethod
*
* @var array
*/
protected $outputFormatters = [];
protected $outputFormatters = [
BigNumberFormatter::class
];
/**
* defaultValues

View File

@ -126,7 +126,7 @@ class EthApiTest extends TestCase
if ($err !== null) {
return $this->fail($err->getMessage());
}
$this->assertTrue(is_string($gasPrice));
$this->assertTrue(is_numeric($gasPrice->toString()));
});
}