Fixed some weird cases for TestRPC and getTransaction.
This commit is contained in:
parent
e8b23c29a5
commit
5a837e1b0a
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ethers-providers",
|
||||
"version": "2.1.10",
|
||||
"version": "2.1.11",
|
||||
"description": "Service provider for Ethereum wallet library.",
|
||||
"bugs": {
|
||||
"url": "http://github.com/ethers-io/ethers.js/issues",
|
||||
|
@ -188,6 +188,12 @@ function checkTransaction(transaction) {
|
||||
transaction.gasLimit = transaction.gas;
|
||||
}
|
||||
|
||||
// Some clients (TestRPC) do strange things like return 0x0 for the
|
||||
// 0 address; correct this to be a real address
|
||||
if (transaction.to && utils.bigNumberify(transaction.to).isZero) {
|
||||
transaction.to = '0x0000000000000000000000000000000000000000';
|
||||
}
|
||||
|
||||
// Rename input to data
|
||||
if (transaction.input != null && transaction.data == null) {
|
||||
transaction.data = transaction.input;
|
||||
|
Loading…
Reference in New Issue
Block a user