fix: gql query lookupAuthorities and bond module messages (#25)

This commit is contained in:
nikugogoi 2022-04-05 19:23:49 +05:30 committed by GitHub
parent 96393bfc36
commit 401e351080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 2 deletions

View File

@ -47,7 +47,7 @@ func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([
return nil, err return nil, err
} }
if nameAuthority.AuctionId == "" { if nameAuthority.AuctionId != "" {
auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.AuctionRequest{Id: nameAuthority.GetAuctionId()}) auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.AuctionRequest{Id: nameAuthority.GetAuctionId()})
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -87,4 +87,4 @@ if [[ $1 == "pending" ]]; then
fi fi
# Start the node (remove the --pruning=nothing flag if historical queries are not needed) # Start the node (remove the --pruning=nothing flag if historical queries are not needed)
ethermintd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable ethermintd start --pruning=nothing --evm.tracer=json $TRACE --log_level $LOGLEVEL --minimum-gas-prices=0.0001aphoton --json-rpc.api eth,txpool,personal,net,debug,web3,miner --api.enable --gql-server --gql-playground

View File

@ -56,6 +56,12 @@ func NewMsgRefillBond(id string, amount sdk.Coin, signer sdk.AccAddress) MsgRefi
} }
} }
// Route Implements Msg.
func (msg MsgRefillBond) Route() string { return RouterKey }
// Type Implements Msg.
func (msg MsgRefillBond) Type() string { return "refill" }
func (msg MsgRefillBond) ValidateBasic() error { func (msg MsgRefillBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
@ -89,6 +95,12 @@ func NewMsgWithdrawBond(id string, amount sdk.Coin, signer sdk.AccAddress) MsgWi
} }
} }
// Route Implements Msg.
func (msg MsgWithdrawBond) Route() string { return RouterKey }
// Type Implements Msg.
func (msg MsgWithdrawBond) Type() string { return "withdraw" }
func (msg MsgWithdrawBond) ValidateBasic() error { func (msg MsgWithdrawBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)
@ -121,6 +133,12 @@ func NewMsgCancelBond(id string, signer sdk.AccAddress) MsgCancelBond {
} }
} }
// Route Implements Msg.
func (msg MsgCancelBond) Route() string { return RouterKey }
// Type Implements Msg.
func (msg MsgCancelBond) Type() string { return "cancel" }
func (msg MsgCancelBond) ValidateBasic() error { func (msg MsgCancelBond) ValidateBasic() error {
if len(msg.Id) == 0 { if len(msg.Id) == 0 {
return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id) return sdkerrors.Wrap(sdkerrors.ErrInvalidRequest, msg.Id)