aboutsummaryrefslogtreecommitdiffstats
path: root/rpc/args.go
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/args.go')
-rw-r--r--rpc/args.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/rpc/args.go b/rpc/args.go
index 70618a01a..a8cb7dcb1 100644
--- a/rpc/args.go
+++ b/rpc/args.go
@@ -1021,12 +1021,15 @@ func (args *WhisperFilterArgs) UnmarshalJSON(b []byte) (err error) {
return NewInsufficientParamsError(len(obj), 1)
}
- var argstr string
- argstr, ok := obj[0].To.(string)
- if !ok {
- return NewInvalidTypeError("to", "is not a string")
+ if obj[0].To == nil {
+ args.To = ""
+ } else {
+ argstr, ok := obj[0].To.(string)
+ if !ok {
+ return NewInvalidTypeError("to", "is not a string")
+ }
+ args.To = argstr
}
- args.To = argstr
t := make([]string, len(obj[0].Topics))
for i, j := range obj[0].Topics {