chore(x/tx): partly revert NewEncoder usage (#16936)

This commit is contained in:
Julien Robert 2023-07-13 13:30:55 +02:00 committed by GitHub
parent e0be2b80fc
commit 936780b160
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 3 deletions

View File

@ -25,7 +25,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## [v0.1.0-alpha.2](https://github.com/cosmos/cosmos-sdk/releases/tag/store%2Fv0.1.0-alpha.2) - 2023-07-11
## [v1.0.0-alpha.1](https://github.com/cosmos/cosmos-sdk/releases/tag/store%2Fv1.0.0-alpha.1) - 2023-07-11
### Features

View File

@ -31,6 +31,12 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [Unreleased]
## v0.9.1
### Improvements
* [#16936](https://github.com/cosmos/cosmos-sdk/pull/16936) Remove extra whitespace when marshalling module accounts.
## v0.9.0
### Bug Fixes

View File

@ -129,8 +129,12 @@ func moduleAccountEncoder(_ *Encoder, msg protoreflect.Message, w io.Writer) err
pretty.Sequence = 0
}
enc := json.NewEncoder(w)
err := enc.Encode(pretty)
// we do not want to use the json encoder here because it adds a newline
bz, err := json.Marshal(pretty)
if err != nil {
return err
}
_, err = w.Write(bz)
return err
}