Skip to content

Commit

Permalink
chore(x/tx): partly revert NewEncoder usage
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt committed Jul 11, 2023
1 parent 8bef7fa commit e2de661
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion store/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions x/tx/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

## v0.9.1

### Improvements

* [#]() Remove extra whitespace when marshalling module accounts.

## v0.9.0

### Bug Fixes
Expand Down
8 changes: 6 additions & 2 deletions x/tx/signing/aminojson/encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e2de661

Please sign in to comment.