mobile: add whisper client (#15922)
This commit is contained in:
committed by
Felix Lange
parent
cc2b39bbd1
commit
6fc8494620
@ -138,7 +138,9 @@ func (ec *EthereumClient) SubscribeNewHead(ctx *Context, handler NewHeadHandler,
|
||||
handler.OnNewHead(&Header{header})
|
||||
|
||||
case err := <-rawSub.Err():
|
||||
handler.OnError(err.Error())
|
||||
if err != nil {
|
||||
handler.OnError(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -227,7 +229,9 @@ func (ec *EthereumClient) SubscribeFilterLogs(ctx *Context, query *FilterQuery,
|
||||
handler.OnFilterLogs(&Log{&log})
|
||||
|
||||
case err := <-rawSub.Err():
|
||||
handler.OnError(err.Error())
|
||||
if err != nil {
|
||||
handler.OnError(err.Error())
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user