Skip to content

Commit

Permalink
Update code status handling for getTransactionReceipt (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
BoThe1K authored Dec 15, 2023
1 parent 0e9c7c3 commit fef46ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rpc/namespaces/ethereum/eth/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (

"github.com/spf13/viper"

abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
tmrpctypes "github.com/tendermint/tendermint/rpc/core/types"

Expand Down Expand Up @@ -801,7 +802,7 @@ func (e *PublicAPI) GetTransactionReceipt(hash common.Hash) (*rpctypes.Transacti
)
// Set status codes based on tx result
status := ethtypes.ReceiptStatusSuccessful
if res.TxResult.GetCode() == 1 {
if res.TxResult.GetCode() != abci.CodeTypeOK {
status = ethtypes.ReceiptStatusFailed
} else {
// Get the transaction result from the log
Expand Down

0 comments on commit fef46ee

Please sign in to comment.