diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f2b0cfd57..0b6140ce6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * (cosmovisor) [\#792](https://github.com/line/lbm-sdk/pull/792) Use upstream's cosmovisor * (server) [\#821](https://github.com/line/lbm-sdk/pull/821) Get validator pubkey considering KMS +* (client) [\#890](https://github.com/line/lbm-sdk/pull/890) Map Ostracon:ErrTxInMap to lbm-sdk:ErrTxInMempoolCache ### Bug Fixes * (client) [\#817](https://github.com/line/lbm-sdk/pull/817) remove support for composite (BLS) type diff --git a/client/broadcast.go b/client/broadcast.go index d2e96ed3c1..bebe94c33c 100644 --- a/client/broadcast.go +++ b/client/broadcast.go @@ -56,7 +56,8 @@ func CheckTendermintError(err error, tx octypes.Tx) *sdk.TxResponse { txHash := fmt.Sprintf("%X", tx.Hash()) switch { - case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())): + case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())), + strings.Contains(errStr, strings.ToLower(mempool.ErrTxInMap.Error())): return &sdk.TxResponse{ Code: sdkerrors.ErrTxInMempoolCache.ABCICode(), Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(), diff --git a/client/broadcast_test.go b/client/broadcast_test.go index b699080594..347ab44453 100644 --- a/client/broadcast_test.go +++ b/client/broadcast_test.go @@ -44,6 +44,7 @@ func CreateContextWithErrorAndMode(err error, mode string) Context { func TestBroadcastError(t *testing.T) { errors := map[error]uint32{ mempool.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(), + mempool.ErrTxInMap: sdkerrors.ErrTxInMempoolCache.ABCICode(), mempool.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(), mempool.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(), }