Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Problem: config/client.toml keyring-backend not working correctly (fix
Browse files Browse the repository at this point in the history
…#724)

refactoring

fix lint

refactoring

Apply suggestions from code review

add changelog
  • Loading branch information
leejw51crypto committed Nov 12, 2021
1 parent a874c1e commit 61d9c37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
-->

# Changelog
* (app,cli)[\#725](https://github.com/tharsis/ethermint/pull/725) different keyring-backend in adding,list keys

## Unreleased

Expand Down
6 changes: 2 additions & 4 deletions client/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,12 @@ func runAddCmd(cmd *cobra.Command, args []string) error {
dryRun, _ := cmd.Flags().GetBool(flags.FlagDryRun)
if dryRun {
kr, err = keyring.New(sdk.KeyringServiceName(), keyring.BackendMemory, clientCtx.KeyringDir, buf, hd.EthSecp256k1Option())
} else {
backend, _ := cmd.Flags().GetString(flags.FlagKeyringBackend)
kr, err = keyring.New(sdk.KeyringServiceName(), backend, clientCtx.KeyringDir, buf, hd.EthSecp256k1Option())
clientCtx = clientCtx.WithKeyring(kr)
}

if err != nil {
return err
}

return clientkeys.RunAddCmd(clientCtx.WithKeyring(kr), cmd, args, buf)
return clientkeys.RunAddCmd(clientCtx, cmd, args, buf)
}

0 comments on commit 61d9c37

Please sign in to comment.