[#1422] morph/client: Fetch group key properly

NNS contract `resolve` method returns an array.
`neofs-adm` is already up to date.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2022-05-23 14:58:13 +03:00 committed by LeL
parent 86552cf3ae
commit c57114def3

View file

@ -214,7 +214,12 @@ func (c *Client) contractGroupKey() (*keys.PublicKey, error) {
return nil, err
}
bs, err := item.TryBytes()
arr, ok := item.Value().([]stackitem.Item)
if !ok || len(arr) == 0 {
return nil, errors.New("NNS record is missing")
}
bs, err := arr[0].TryBytes()
if err != nil {
return nil, err
}