Skip to content

Commit

Permalink
fix: unittest error of wasm cli query_test (remove query unittest bec…
Browse files Browse the repository at this point in the history
…ause there is a similar test in testutil.)
  • Loading branch information
zemyblue committed Apr 3, 2024
1 parent c36aaa8 commit f387943
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 444 deletions.
8 changes: 8 additions & 0 deletions appplus/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ func SetupWithGenesisValSet(
func NewWasmAppWithCustomOptions(t *testing.T, isCheckTx bool, options SetupOptions) *WasmPlusApp {
t.Helper()

config := sdk.GetConfig()
config.SetBech32PrefixForAccount("link", "linkpub")
config.SetBech32PrefixForValidator("linkvaloper", "linkvaloperpub")
config.SetBech32PrefixForConsensusNode("linkvalcons", "linkvalconspub")
config.SetPurpose(44)
config.SetCoinType(438)
config.Seal()

privVal := mock.NewPV()
pubKey, err := privVal.GetPubKey()
require.NoError(t, err)
Expand Down
5 changes: 2 additions & 3 deletions x/wasm/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func GetCmdListCode() *cobra.Command {
SilenceUsage: true,
}
flags.AddQueryFlagsToCmd(cmd)
addPaginationFlags(cmd, "list codes")
flags.AddPaginationFlagsToCmd(cmd, "list codes")
return cmd
}

Expand Down Expand Up @@ -190,7 +190,7 @@ func GetCmdListContractByCode() *cobra.Command {
SilenceUsage: true,
}
flags.AddQueryFlagsToCmd(cmd)
addPaginationFlags(cmd, "list contracts by code")
flags.AddPaginationFlagsToCmd(cmd, "list contracts by code")
return cmd
}

Expand Down Expand Up @@ -307,7 +307,6 @@ func GetCmdGetContractInfo() *cobra.Command {
}
return clientCtx.PrintProto(res)
},
SilenceUsage: true,
}
flags.AddQueryFlagsToCmd(cmd)
return cmd
Expand Down
Loading

0 comments on commit f387943

Please sign in to comment.