[#14] Adopt stackitems in morph requests

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2020-08-27 14:57:13 +03:00
parent 0c06eafc60
commit 29d6ababae
9 changed files with 23 additions and 22 deletions

View file

@ -42,7 +42,7 @@ func (c *Client) EACL(args EACLArgs) (*EACLValues, error) {
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.eaclMethod, ln)
}
eacl, err := client.BytesFromStackParameter(prms[0])
eacl, err := client.BytesFromStackItem(prms[0])
if err != nil {
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.eaclMethod)
}

View file

@ -42,7 +42,7 @@ func (c *Client) Get(args GetArgs) (*GetValues, error) {
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.getMethod, ln)
}
cnrBytes, err := client.BytesFromStackParameter(prms[0])
cnrBytes, err := client.BytesFromStackItem(prms[0])
if err != nil {
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.getMethod)
}

View file

@ -48,7 +48,7 @@ func (c *Client) List(args ListArgs) (*ListValues, error) {
return nil, errors.Errorf("unexpected stack item count (%s): %d", c.listMethod, ln)
}
prms, err = client.ArrayFromStackParameter(prms[0])
prms, err = client.ArrayFromStackItem(prms[0])
if err != nil {
return nil, errors.Wrapf(err, "could not get stack item array from stack item (%s)", c.listMethod)
}
@ -58,7 +58,7 @@ func (c *Client) List(args ListArgs) (*ListValues, error) {
}
for i := range prms {
cid, err := client.BytesFromStackParameter(prms[i])
cid, err := client.BytesFromStackItem(prms[i])
if err != nil {
return nil, errors.Wrapf(err, "could not get byte array from stack item (%s)", c.listMethod)
}