mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 13:41:47 +00:00
rpcbinding: use typed return err value in etTypeConverter
Otherwise the resulting code can't be compiled. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
8beb9f23c3
commit
0f0f7b364f
3 changed files with 4 additions and 4 deletions
|
@ -709,7 +709,7 @@ func (res *LedgerWitnessCondition) FromStackItem(item stackitem.Item) error {
|
|||
}
|
||||
|
||||
index++
|
||||
res.Value, err = arr[index].Value(), nil
|
||||
res.Value, err = arr[index].Value(), error(nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("field Value: %w", err)
|
||||
}
|
||||
|
@ -1193,7 +1193,7 @@ func (res *ManagementManifest) FromStackItem(item stackitem.Item) error {
|
|||
}
|
||||
|
||||
index++
|
||||
res.Extra, err = arr[index].Value(), nil
|
||||
res.Extra, err = arr[index].Value(), error(nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("field Extra: %w", err)
|
||||
}
|
||||
|
|
|
@ -96,7 +96,7 @@ func (c *ContractReader) Any(a any) (any, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return item.Value(), nil
|
||||
return item.Value(), error(nil)
|
||||
} (unwrap.Item(c.invoker.Call(Hash, "any", a)))
|
||||
}
|
||||
|
||||
|
|
|
@ -412,7 +412,7 @@ func extendedTypeToGo(et binding.ExtendedType, named map[string]binding.Extended
|
|||
func etTypeConverter(et binding.ExtendedType, v string) string {
|
||||
switch et.Base {
|
||||
case smartcontract.AnyType:
|
||||
return v + ".Value(), nil"
|
||||
return v + ".Value(), error(nil)"
|
||||
case smartcontract.BoolType:
|
||||
return v + ".TryBool()"
|
||||
case smartcontract.IntegerType:
|
||||
|
|
Loading…
Reference in a new issue