Skip to content

Commit

Permalink
fix: module arkeo and claim
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyasbhat0 committed Jul 30, 2024
1 parent 07ba5a1 commit e0543e3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion x/arkeo/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// GetQueryCmd returns the cli query commands for this module
func GetQueryCmd(queryRoute string) *cobra.Command {
func GetQueryCmd() *cobra.Command {
// Group arkeo queries under a subcommand
cmd := &cobra.Command{
Use: types.ModuleName,
Expand Down
6 changes: 4 additions & 2 deletions x/arkeo/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
_ = types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx))
if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil {
panic(fmt.Errorf("registering query handler for x/%s: %w", types.ModuleName, err))
}
}

// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module
Expand All @@ -84,7 +86,7 @@ func (a AppModuleBasic) GetTxCmd() *cobra.Command {

// GetQueryCmd returns the root query command for the module. The subcommands of this root command are used by end-users to generate new queries to the subset of the state defined by the module
func (AppModuleBasic) GetQueryCmd() *cobra.Command {
return cli.GetQueryCmd(types.StoreKey)
return cli.GetQueryCmd()
}

// ----------------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion x/claim/keeper/msg_server_add_claim_testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/arkeonetwork/arkeo/common/cosmos"
"github.com/arkeonetwork/arkeo/x/claim/types"
)

Expand All @@ -18,7 +19,7 @@ func (k msgServer) AddClaim(goCtx context.Context, msg *types.MsgAddClaim) (*typ
"creator", msg.Creator,
"amount", msg.Amount)
// This method is only provide on testnet for test purpose , so allow to override the record
coin := sdk.NewCoin(types.DefaultClaimDenom, sdk.NewInt(msg.Amount))
coin := sdk.NewCoin(types.DefaultClaimDenom, cosmos.NewInt(msg.Amount))
claim := types.ClaimRecord{
Chain: msg.Chain,
Address: msg.Address,
Expand Down
4 changes: 3 additions & 1 deletion x/claim/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, config client.TxEncod

// RegisterGRPCGatewayRoutes registers the gRPC Gateway routes for the module
func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) {
types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) // nolint
if err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)); err != nil {
panic(fmt.Errorf("registering query handler for x/%s: %w", types.ModuleName, err))
} // nolint
}

// GetTxCmd returns the root Tx command for the module. The subcommands of this root command are used by end-users to generate new transactions containing messages defined in the module
Expand Down

0 comments on commit e0543e3

Please sign in to comment.