[#15] Parse StackItem structs as arrays

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
support/v0.27
Alex Vanin 2020-08-31 18:17:31 +03:00
parent 8f5ea75eb6
commit c299de5de9
1 changed files with 1 additions and 1 deletions

View File

@ -179,7 +179,7 @@ func ArrayFromStackItem(param stackitem.Item) ([]stackitem.Item, error) {
switch param.Type() {
case stackitem.AnyT:
return nil, nil
case stackitem.ArrayT:
case stackitem.ArrayT, stackitem.StructT:
items, ok := param.Value().([]stackitem.Item)
if !ok {
return nil, errors.Errorf("chain/client: can't convert %T to parameter slice", param.Value())