Skip to content

Commit 496bab3

Browse files
mvidmergify[bot]
authored andcommitted
fix: list keys output for empty keys (#15876)
(cherry picked from commit 5948b38) # Conflicts: # CHANGELOG.md
1 parent 967efc6 commit 496bab3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,19 @@ Ref: https://keepachangelog.com/en/1.0.0/
4747

4848
* (baseapp) [#15789](https://github.com/cosmos/cosmos-sdk/pull/15789) Ensure `PrepareProposal` and `ProcessProposal` respect `InitialHeight` set by CometBFT when set to a value greater than 1.
4949
* (types) [#15433](https://github.com/cosmos/cosmos-sdk/pull/15433) Allow disabling of account address caches (for printing bech32 account addresses).
50+
<<<<<<< HEAD
51+
=======
52+
* (x/auth) [#15059](https://github.com/cosmos/cosmos-sdk/pull/15059) `ante.CountSubKeys` returns 0 when passing a nil `Pubkey`.
53+
* (x/capability) [#15030](https://github.com/cosmos/cosmos-sdk/pull/15030) Prevent `x/capability` from consuming `GasMeter` gas during `InitMemStore`
54+
* (types/coin) [#14739](https://github.com/cosmos/cosmos-sdk/pull/14739) Deprecate the method `Coin.IsEqual` in favour of `Coin.Equal`. The difference between the two methods is that the first one results in a panic when denoms are not equal. This panic lead to unexpected behavior
55+
* (x/crypto) [#15258](https://github.com/cosmos/cosmos-sdk/pull/15258) Write keyhash file with permissions 0600 instead of 0555.
56+
* (client/keys) [15867](https://github.com/cosmos/cosmos-sdk/pull/15876) Fix the output of the client keys query when there are no keys
57+
58+
### Deprecated
59+
60+
* (x/staking) [#14567](https://github.com/cosmos/cosmos-sdk/pull/14567) The `delegator_address` field of `MsgCreateValidator` has been deprecated.
61+
The validator address bytes and delegator address bytes refer to the same account while creating validator (defer only in bech32 notation).
62+
>>>>>>> 5948b38c1 (fix: list keys output for empty keys (#15876))
5063
5164
## [v0.47.1](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.47.1) - 2023-03-23
5265

client/keys/list.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package keys
22

33
import (
4+
"github.com/cosmos/cosmos-sdk/client/flags"
45
"github.com/spf13/cobra"
56

67
"github.com/cosmos/cosmos-sdk/client"
@@ -33,7 +34,7 @@ func runListCmd(cmd *cobra.Command, _ []string) error {
3334
return err
3435
}
3536

36-
if len(records) == 0 {
37+
if len(records) == 0 && clientCtx.OutputFormat == flags.OutputFormatText {
3738
cmd.Println("No records were found in keyring")
3839
return nil
3940
}

0 commit comments

Comments
 (0)