mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-04 10:21:40 +00:00
feature/implement did state (#15)
* refactor: update model proto * feat: add status field to Controller * feat: add Verification.Kind field to state protobuf to support different verification types * fix: remove QueryService and QueryResolve RPCs from query.proto
This commit is contained in:
@@ -47,9 +47,9 @@ func (ms msgServer) AllocateVault(
|
||||
) (*types.MsgAllocateVaultResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
// 1.Check if the service origin is valid
|
||||
if ms.k.IsValidServiceOrigin(ctx, msg.Origin) {
|
||||
return nil, types.ErrInvalidServiceOrigin
|
||||
}
|
||||
// if ms.k.IsValidServiceOrigin(ctx, msg.Origin) {
|
||||
// return nil, types.ErrInvalidServiceOrigin
|
||||
// }
|
||||
|
||||
cid, expiryBlock, err := ms.k.assembleInitialVault(ctx)
|
||||
if err != nil {
|
||||
@@ -92,13 +92,13 @@ func (ms msgServer) RegisterService(
|
||||
goCtx context.Context,
|
||||
msg *types.MsgRegisterService,
|
||||
) (*types.MsgRegisterServiceResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
|
||||
// 1.Check if the service origin is valid
|
||||
if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) {
|
||||
return nil, types.ErrInvalidServiceOrigin
|
||||
}
|
||||
return ms.k.insertService(ctx, msg.Service)
|
||||
// if !ms.k.IsValidServiceOrigin(ctx, msg.Service.Origin) {
|
||||
// return nil, types.ErrInvalidServiceOrigin
|
||||
// }
|
||||
return nil, errors.Wrapf(types.ErrInvalidServiceOrigin, "invalid service origin")
|
||||
}
|
||||
|
||||
// # UpdateParams
|
||||
|
||||
Reference in New Issue
Block a user