Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove client/keys.KeysCdc #13781

Merged
merged 4 commits into from
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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`.

### 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
jacobhjkim marked this conversation as resolved.
Show resolved Hide resolved
out, err := KeysCdc.MarshalJSON(kos)
out, err := json.Marshal(kos)
if err != nil {
return err
}
Expand Down