-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: fix some non conventional issues on sudo module (#1491)
* fix some non conventional issues on sudo module * linter * remove old handler * linter * linter * linter * use constants * linter
- Loading branch information
Showing
24 changed files
with
195 additions
and
234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
package sudo | ||
package keeper | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/NibiruChain/nibiru/x/sudo/pb" | ||
"github.com/NibiruChain/nibiru/x/sudo/types" | ||
|
||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"google.golang.org/grpc/codes" | ||
"google.golang.org/grpc/status" | ||
) | ||
|
||
// Ensure the interface is properly implemented at compile time | ||
var _ pb.QueryServer = Keeper{} | ||
var _ types.QueryServer = Keeper{} | ||
|
||
func (k Keeper) QuerySudoers( | ||
goCtx context.Context, | ||
req *pb.QuerySudoersRequest, | ||
) (resp *pb.QuerySudoersResponse, err error) { | ||
req *types.QuerySudoersRequest, | ||
) (resp *types.QuerySudoersResponse, err error) { | ||
if req == nil { | ||
return nil, status.Error(codes.InvalidArgument, "invalid request") | ||
} | ||
|
||
ctx := sdk.UnwrapSDKContext(goCtx) | ||
sudoers, err := k.Sudoers.Get(ctx) | ||
|
||
return &pb.QuerySudoersResponse{ | ||
return &types.QuerySudoersResponse{ | ||
Sudoers: sudoers, | ||
}, err | ||
} |
Oops, something went wrong.