status-go/shhext/signal.go
Dmitry Shulyak ba9a25e284
Implement shh api extension that allows to confirm that message is sent (#814)
* Implement shh api extension that allows to confirm that message is sent

* Add a patch

* Fix linter

* Add readme

* Add tests for tracker

* Address review
2018-04-11 18:41:51 +03:00

22 lines
492 B
Go

package shhext
import (
"github.com/ethereum/go-ethereum/common"
"github.com/status-im/status-go/geth/signal"
)
// EnvelopeSentSignal includes hash of the sent envelope.
type EnvelopeSentSignal struct {
Hash common.Hash `json:"hash"`
}
// SendEnvelopeSentSignal sends an envelope.sent signal with hash of the envelope.
func SendEnvelopeSentSignal(hash common.Hash) {
signal.Send(signal.Envelope{
Type: signal.EventEnvelopeSent,
Event: EnvelopeSentSignal{
Hash: hash,
},
})
}