forked from cerc-io/laconicd-deprecated
fix: Web3 RPC handlers panic (#702)
* Problem: Some Web3 RPC Handlers could panic Closes: #701 Solution: - return error rather than panic when decoding invalid tx * add validation rules * changelog
This commit is contained in:
+4
-1
@@ -68,7 +68,10 @@ func (g txConfig) TxDecoder() sdk.TxDecoder {
|
||||
err := tx.UnmarshalBinary(txBytes)
|
||||
if err == nil {
|
||||
msg := &evmtypes.MsgEthereumTx{}
|
||||
msg.FromEthereumTx(tx)
|
||||
err := msg.FromEthereumTx(tx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return msg, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user