-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ccb747
commit de7f7d0
Showing
5 changed files
with
51 additions
and
46 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
package keeper | ||
|
||
import ( | ||
"github.com/cheqd/cheqd-node/x/did/types" | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
// import ( | ||
// "github.com/cheqd/cheqd-node/x/did/types" | ||
// "github.com/cosmos/cosmos-sdk/codec" | ||
// sdk "github.com/cosmos/cosmos-sdk/types" | ||
// sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" | ||
|
||
abci "github.com/cometbft/cometbft/abci/types" | ||
) | ||
// abci "github.com/cometbft/cometbft/abci/types" | ||
// ) | ||
|
||
func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { | ||
return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { | ||
var ( | ||
res []byte | ||
err error | ||
) | ||
// func NewQuerier(k Keeper, legacyQuerierCdc *codec.LegacyAmino) sdk.Querier { | ||
// return func(ctx sdk.Context, path []string, req abci.RequestQuery) ([]byte, error) { | ||
// var ( | ||
// res []byte | ||
// err error | ||
// ) | ||
|
||
switch path[0] { | ||
case types.QueryGetDidDoc: | ||
return getDidDoc(ctx, path[1], k, legacyQuerierCdc) | ||
case types.QueryGetAllDidDocVersions: | ||
return getAllDidDocVersionsMetadata(ctx, path[1], k, legacyQuerierCdc) | ||
case types.QueryGetDidDocVersion: | ||
return getDidDocVersion(ctx, path[1], path[2], k, legacyQuerierCdc) | ||
// switch path[0] { | ||
// case types.QueryGetDidDoc: | ||
// return getDidDoc(ctx, path[1], k, legacyQuerierCdc) | ||
// case types.QueryGetAllDidDocVersions: | ||
// return getAllDidDocVersionsMetadata(ctx, path[1], k, legacyQuerierCdc) | ||
// case types.QueryGetDidDocVersion: | ||
// return getDidDocVersion(ctx, path[1], path[2], k, legacyQuerierCdc) | ||
|
||
default: | ||
err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) | ||
} | ||
// default: | ||
// err = sdkerrors.Wrapf(sdkerrors.ErrUnknownRequest, "unknown %s query endpoint: %s", types.ModuleName, path[0]) | ||
// } | ||
|
||
return res, err | ||
} | ||
} | ||
// return res, err | ||
// } | ||
// } |
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