Skip to content

Commit

Permalink
check user dust query address
Browse files Browse the repository at this point in the history
  • Loading branch information
faneaatiku committed Jun 30, 2024
1 parent a06e441 commit efa56e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion x/tradebin/keeper/grpc_query_all_user_dust.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package keeper

import (
"context"

"github.com/bze-alphateam/bze/x/tradebin/types"
sdk "github.com/cosmos/cosmos-sdk/types"
"google.golang.org/grpc/codes"
Expand All @@ -15,6 +14,10 @@ func (k Keeper) AllUserDust(goCtx context.Context, req *types.QueryAllUserDustRe
}

ctx := sdk.UnwrapSDKContext(goCtx)
_, err := sdk.AccAddressFromBech32(req.Address)
if err != nil {
return nil, status.Error(codes.InvalidArgument, "invalid address")
}

list := k.GetUserDustByOwner(ctx, req.Address)

Expand Down

0 comments on commit efa56e8

Please sign in to comment.