forked from cerc-io/laconicd-deprecated
rpc: fix metamask pending while sending an error transaction (#711)
* fix pending state in metamaks wallet when sending an error tx and rejected by antehandle * using abci.CodeTypeOK instead 0
This commit is contained in:
parent
35bb751bac
commit
cfe629c14f
@ -472,6 +472,9 @@ func (api *PublicEthereumAPI) SendTransaction(args rpctypes.SendTxArgs) (common.
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
||||
if res.Code != abci.CodeTypeOK {
|
||||
return common.Hash{}, fmt.Errorf(res.RawLog)
|
||||
}
|
||||
// Return transaction hash
|
||||
return common.HexToHash(res.TxHash), nil
|
||||
}
|
||||
@ -501,6 +504,9 @@ func (api *PublicEthereumAPI) SendRawTransaction(data hexutil.Bytes) (common.Has
|
||||
return common.Hash{}, err
|
||||
}
|
||||
|
||||
if res.Code != abci.CodeTypeOK {
|
||||
return common.Hash{}, fmt.Errorf(res.RawLog)
|
||||
}
|
||||
// Return transaction hash
|
||||
return common.HexToHash(res.TxHash), nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user