Fix transaction hash return (#105)

This commit is contained in:
Austin Abell 2019-09-24 14:41:59 -04:00 committed by GitHub
parent 4a030335e6
commit d1900826a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -259,8 +259,8 @@ func (e *PublicEthAPI) SendTransaction(args args.SendTxArgs) (common.Hash, error
return common.Hash{}, err return common.Hash{}, err
} }
// Return RLP encoded bytes // Return transaction hash
return tx.Hash(), nil return common.HexToHash(res.TxHash), nil
} }
// SendRawTransaction send a raw Ethereum transaction. // SendRawTransaction send a raw Ethereum transaction.
@ -289,8 +289,8 @@ func (e *PublicEthAPI) SendRawTransaction(data hexutil.Bytes) (common.Hash, erro
return common.Hash{}, err return common.Hash{}, err
} }
// Return RLP encoded bytes // Return transaction hash
return tx.Hash(), nil return common.HexToHash(res.TxHash), nil
} }
// CallArgs represents arguments to a smart contract call as provided by RPC clients. // CallArgs represents arguments to a smart contract call as provided by RPC clients.