mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 23:33:37 +00:00
parent
dc980b5847
commit
9d500b86fc
1 changed files with 3 additions and 3 deletions
|
@ -36,7 +36,7 @@ type ParameterContext struct {
|
||||||
type paramContext struct {
|
type paramContext struct {
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Net uint32 `json:"network"`
|
Net uint32 `json:"network"`
|
||||||
Hex []byte `json:"hex"`
|
Data []byte `json:"data"`
|
||||||
Items map[string]json.RawMessage `json:"items"`
|
Items map[string]json.RawMessage `json:"items"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ func (c ParameterContext) MarshalJSON() ([]byte, error) {
|
||||||
pc := ¶mContext{
|
pc := ¶mContext{
|
||||||
Type: c.Type,
|
Type: c.Type,
|
||||||
Net: uint32(c.Network),
|
Net: uint32(c.Network),
|
||||||
Hex: verif,
|
Data: verif,
|
||||||
Items: items,
|
Items: items,
|
||||||
}
|
}
|
||||||
return json.Marshal(pc)
|
return json.Marshal(pc)
|
||||||
|
@ -192,7 +192,7 @@ func (c *ParameterContext) UnmarshalJSON(data []byte) error {
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unsupported type: %s", c.Type)
|
return fmt.Errorf("unsupported type: %s", c.Type)
|
||||||
}
|
}
|
||||||
err := verif.DecodeSignedPart(pc.Hex)
|
err := verif.DecodeSignedPart(pc.Data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue