Handle error on Address not found

If we use a wallet address which does not exist, it gives the following error: 
```
Error: empty address string is not allowed
```
which is coming from the SDK and confusing to the user. 
The reason is because one error is not handled properly, in the new proposal, the error is handled which returns the following error if the address does not exist:

```
Error: The specified item could not be found in the keyring
```
This commit is contained in:
Mojtaba
2021-10-21 16:09:26 +02:00
committed by GitHub
parent dd390d7f5f
commit 0984acaf7e

View File

@@ -57,6 +57,9 @@ func StoreCodeCmd() *cobra.Command {
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
clientCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
msg, err := parseStoreCodeArgs(args[0], clientCtx.GetFromAddress(), cmd.Flags())
if err != nil {
return err