Skip to content

Commit

Permalink
Eth JSON-RPC: from in eth_getTransactionByHash is not correctly popul…
Browse files Browse the repository at this point in the history
…ated #1614
  • Loading branch information
maciejwitowski committed Jan 31, 2023
1 parent dc5f865 commit 070aca2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions chain/types/ethtypes/eth_transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ func EthTxFromSignedEthMessage(smsg *types.SignedMessage) (EthTx, error) {
return EthTx{}, xerrors.Errorf("failed to recover signature: %w", err)
}

fromAddr, err := EthAddressFromFilecoinAddress(smsg.Message.From)
if err != nil {
return EthTx{}, xerrors.Errorf("failed to get from: %w", err)
}

return EthTx{
Nonce: EthUint64(txArgs.Nonce),
ChainID: EthUint64(txArgs.ChainID),
To: txArgs.To,
From: fromAddr,
Value: EthBigInt(txArgs.Value),
Type: Eip1559TxType,
Gas: EthUint64(txArgs.GasLimit),
Expand Down

0 comments on commit 070aca2

Please sign in to comment.