[#193] pkg/client: Update container structure

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-11-11 16:50:34 +03:00 committed by Alex Vanin
parent 5ff7b5ba6b
commit d442b204ca

View file

@ -100,10 +100,10 @@ func (c Client) putContainerV2(ctx context.Context, cnr *container.Container, op
}
// set transport version
cnr.SetVersion(c.remoteNode.Version.ToV2())
cnr.SetVersion(c.remoteNode.Version)
// if container owner is not set, then use client key as owner
if cnr.GetOwnerID() == nil {
if cnr.OwnerID() == nil {
w, err := owner.NEO3WalletFromPublicKey(&c.key.PublicKey)
if err != nil {
return nil, err
@ -112,7 +112,7 @@ func (c Client) putContainerV2(ctx context.Context, cnr *container.Container, op
ownerID := new(owner.ID)
ownerID.SetNeo3Wallet(w)
cnr.SetOwnerID(ownerID.ToV2())
cnr.SetOwnerID(ownerID)
}
reqBody := new(v2container.PutRequestBody)