[#1377] oid, cid: Upgrade SDK package

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-05-12 19:37:46 +03:00 committed by LeL
parent f65898a354
commit f15e6e888f
118 changed files with 1455 additions and 886 deletions

View file

@ -3,7 +3,6 @@ package container
import (
"fmt"
v2refs "github.com/nspcc-dev/neofs-api-go/v2/refs"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
cid "github.com/nspcc-dev/neofs-sdk-go/container/id"
"github.com/nspcc-dev/neofs-sdk-go/owner"
@ -48,10 +47,14 @@ func (c *Client) List(ownerID *owner.ID) ([]*cid.ID, error) {
return nil, fmt.Errorf("could not get byte array from stack item (%s): %w", listMethod, err)
}
v2 := new(v2refs.ContainerID)
v2.SetValue(rawCid)
var id cid.ID
cidList = append(cidList, cid.NewFromV2(v2))
err = id.Decode(rawCid)
if err != nil {
return nil, fmt.Errorf("decode container ID: %w", err)
}
cidList = append(cidList, &id)
}
return cidList, nil