Fixed wallet creation logic: no owner for the wallet is allwoed

This commit is contained in:
Stephan D
2026-01-21 17:26:45 +01:00
parent 1e5ff51e07
commit 8cb19f897a

View File

@@ -44,10 +44,6 @@ func (c *createManagedWalletCommand) Execute(ctx context.Context, req *chainv1.C
return gsresponse.InvalidArgument[chainv1.CreateManagedWalletResponse](c.deps.Logger, mservice.ChainGateway, merrors.InvalidArgument("organization_ref is required")) return gsresponse.InvalidArgument[chainv1.CreateManagedWalletResponse](c.deps.Logger, mservice.ChainGateway, merrors.InvalidArgument("organization_ref is required"))
} }
ownerRef := strings.TrimSpace(req.GetOwnerRef()) ownerRef := strings.TrimSpace(req.GetOwnerRef())
if ownerRef == "" {
c.deps.Logger.Warn("Missing owner ref")
return gsresponse.InvalidArgument[chainv1.CreateManagedWalletResponse](c.deps.Logger, mservice.ChainGateway, merrors.InvalidArgument("owner_ref is required"))
}
asset := req.GetAsset() asset := req.GetAsset()
if asset == nil { if asset == nil {
@@ -135,7 +131,8 @@ func (c *createManagedWalletCommand) Execute(ctx context.Context, req *chainv1.C
wallet := &model.ManagedWallet{ wallet := &model.ManagedWallet{
Describable: pkgmodel.Describable{ Describable: pkgmodel.Describable{
Name: name, Name: name,
Description: desc.Description,
}, },
IdempotencyKey: idempotencyKey, IdempotencyKey: idempotencyKey,
WalletRef: walletRef, WalletRef: walletRef,