Skip to content

Commit

Permalink
Merge pull request #1077 from scrtlabs/lior-fix-list-by-code-id
Browse files Browse the repository at this point in the history
Fix list-contract-by-code output
  • Loading branch information
assafmo authored Aug 23, 2022
2 parents 382ceac + 20bd97c commit f56577d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/compute/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ func GetCmdListContractByCode() *cobra.Command {
if err != nil {
return err
}

if len(res) == 0 {
return fmt.Errorf("can not find contract with code id %d", codeID)
}

fmt.Println(string(res))
return nil
},
Expand Down

0 comments on commit f56577d

Please sign in to comment.