Skip to content

Commit

Permalink
refactor: remove client/keys.KeysCdc (#13781)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Kim authored Nov 9, 2022
1 parent 22f3261 commit f8e40d7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 129 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* [#13236](https://github.com/cosmos/cosmos-sdk/pull/13236) Integrate Filter Logging
* [#13528](https://github.com/cosmos/cosmos-sdk/pull/13528) Update `ValidateMemoDecorator` to only check memo against `MaxMemoCharacters` param when a memo is present.
* [#13651](https://github.com/cosmos/cosmos-sdk/pull/13651) Update `server/config/config.GetConfig` function.
* [#13781](https://github.com/cosmos/cosmos-sdk/pull/13781) Remove `client/keys.KeysCdc`.
* [#13803](https://github.com/cosmos/cosmos-sdk/pull/13803) Add an error log if iavl set operation failed.

### State Machine Breaking
Expand Down
3 changes: 2 additions & 1 deletion client/keys/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package keys
import (
"bufio"
"bytes"
"encoding/json"
"errors"
"fmt"
"sort"
Expand Down Expand Up @@ -313,7 +314,7 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo
out.Mnemonic = mnemonic
}

jsonString, err := KeysCdc.MarshalJSON(out)
jsonString, err := json.Marshal(out)
if err != nil {
return err
}
Expand Down
27 changes: 0 additions & 27 deletions client/keys/codec.go

This file was deleted.

97 changes: 0 additions & 97 deletions client/keys/codec_test.go

This file was deleted.

3 changes: 2 additions & 1 deletion client/keys/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package keys

import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"io"
Expand Down Expand Up @@ -140,7 +141,7 @@ func displayParseKeyInfo(w io.Writer, stringer fmt.Stringer, output string) {
out, err = yaml.Marshal(&stringer)

case OutputFormatJSON:
out, err = KeysCdc.MarshalJSON(stringer)
out, err = json.Marshal(&stringer)
}

if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions client/keys/utils.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package keys

import (
"encoding/json"
"fmt"
"io"

Expand Down Expand Up @@ -30,7 +31,7 @@ func printKeyringRecord(w io.Writer, k *cryptokeyring.Record, bechKeyOut bechKey
}

case OutputFormatJSON:
out, err := KeysCdc.MarshalJSON(ko)
out, err := json.Marshal(ko)
if err != nil {
return err
}
Expand All @@ -57,8 +58,7 @@ func printKeyringRecords(w io.Writer, records []*cryptokeyring.Record, output st

case OutputFormatJSON:
// TODO https://github.com/cosmos/cosmos-sdk/issues/8046
// Replace AminoCdc with Proto JSON
out, err := KeysCdc.MarshalJSON(kos)
out, err := json.Marshal(kos)
if err != nil {
return err
}
Expand Down

0 comments on commit f8e40d7

Please sign in to comment.