From d1900826a0b43822cb1b721aea5e36b3fa2b9ed8 Mon Sep 17 00:00:00 2001 From: Austin Abell Date: Tue, 24 Sep 2019 14:41:59 -0400 Subject: [PATCH] Fix transaction hash return (#105) --- rpc/eth_api.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpc/eth_api.go b/rpc/eth_api.go index 764eff58..aca871d2 100644 --- a/rpc/eth_api.go +++ b/rpc/eth_api.go @@ -259,8 +259,8 @@ func (e *PublicEthAPI) SendTransaction(args args.SendTxArgs) (common.Hash, error return common.Hash{}, err } - // Return RLP encoded bytes - return tx.Hash(), nil + // Return transaction hash + return common.HexToHash(res.TxHash), nil } // 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 RLP encoded bytes - return tx.Hash(), nil + // Return transaction hash + return common.HexToHash(res.TxHash), nil } // CallArgs represents arguments to a smart contract call as provided by RPC clients.