mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
smartcontract: add support for valueless Parameters
This is fine: { "type" : "Signature" },
This commit is contained in:
parent
59b4377f90
commit
cbe1eeb08c
1 changed files with 5 additions and 1 deletions
|
@ -109,7 +109,11 @@ func (p *Parameter) UnmarshalJSON(data []byte) (err error) {
|
|||
if err = json.Unmarshal(data, &r); err != nil {
|
||||
return
|
||||
}
|
||||
switch p.Type = r.Type; r.Type {
|
||||
p.Type = r.Type
|
||||
if len(r.Value) == 0 {
|
||||
return
|
||||
}
|
||||
switch r.Type {
|
||||
case BoolType:
|
||||
if err = json.Unmarshal(r.Value, &boolean); err != nil {
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue