Skip to content

Commit

Permalink
chore: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
kioqq committed Oct 16, 2023
1 parent 9f1235a commit a61bc79
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions 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 @@ -60,7 +61,7 @@ func RunAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf
interactive, _ := cmd.Flags().GetBool(flagInteractive)
noBackup, _ := cmd.Flags().GetBool(flagNoBackup)
useLedger, _ := cmd.Flags().GetBool(flags.FlagUseLedger)
algoStr, _ := cmd.Flags().GetString(flags.FlagKeyAlgorithm)
algoStr, _ := cmd.Flags().GetString(flags.FlagKeyType)

showMnemonic := !noBackup
kb := ctx.Keyring
Expand Down Expand Up @@ -278,7 +279,8 @@ func printCreate(cmd *cobra.Command, k *keyring.Record, showMnemonic bool, mnemo
out.Mnemonic = mnemonic
}

jsonString, err := keys.KeysCdc.MarshalJSON(out)
jsonString, err := json.Marshal(out)

if err != nil {
return err
}
Expand Down
4 changes: 2 additions & 2 deletions client/keys/utils.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package keys

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

"sigs.k8s.io/yaml"

"github.com/cosmos/cosmos-sdk/client/keys"
cryptokeyring "github.com/cosmos/cosmos-sdk/crypto/keyring"
)

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

case OutputFormatJSON:
out, err := keys.KeysCdc.MarshalJSON(ko)
out, err := json.Marshal(ko)
if err != nil {
return err
}
Expand Down
2 changes: 0 additions & 2 deletions crypto/codec/amino.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package codec

import (
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
Expand All @@ -24,5 +23,4 @@ func RegisterCrypto(cdc *codec.LegacyAmino) {
// NOTE: update SDK's amino codec to include the ethsecp256k1 keys.
// DO NOT REMOVE unless deprecated on the SDK.
legacy.Cdc = cdc
keys.KeysCdc = cdc
}

0 comments on commit a61bc79

Please sign in to comment.