fix(x/tx): don't shadow Amino marshalling error messages (#19955)
This commit is contained in:
parent
649dfaa8c5
commit
15ad85d4e4
@ -39,6 +39,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
* [#19845](https://github.com/cosmos/cosmos-sdk/pull/19845) Use hybrid resolver instead of only protov2 registry
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#19955](https://github.com/cosmos/cosmos-sdk/pull/19955) Don't shadow Amino marshalling error messages
|
||||
|
||||
## v0.13.1
|
||||
|
||||
### Features
|
||||
|
||||
@ -164,6 +164,9 @@ func (enc Encoder) DefineTypeEncoding(typeURL string, encoder MessageEncoder) En
|
||||
func (enc Encoder) Marshal(message proto.Message) ([]byte, error) {
|
||||
buf := &bytes.Buffer{}
|
||||
err := enc.beginMarshal(message.ProtoReflect(), buf, false)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if enc.indent != "" {
|
||||
indentBuf := &bytes.Buffer{}
|
||||
@ -171,10 +174,10 @@ func (enc Encoder) Marshal(message proto.Message) ([]byte, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return indentBuf.Bytes(), err
|
||||
return indentBuf.Bytes(), nil
|
||||
}
|
||||
|
||||
return buf.Bytes(), err
|
||||
return buf.Bytes(), nil
|
||||
}
|
||||
|
||||
func (enc Encoder) beginMarshal(msg protoreflect.Message, writer io.Writer, isAny bool) error {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user