status-go/services/shhext/signal.go

20 lines
579 B
Go
Raw Normal View History

package shhext
import (
"github.com/ethereum/go-ethereum/common"
2018-05-03 07:35:58 +00:00
"github.com/status-im/status-go/signal"
)
// EnvelopeSignalHandler sends signals when envelope is sent or expired.
type EnvelopeSignalHandler struct{}
// EnvelopeSent triggered when envelope delivered atleast to 1 peer.
func (h EnvelopeSignalHandler) EnvelopeSent(hash common.Hash) {
2018-05-03 07:35:58 +00:00
signal.SendEnvelopeSent(hash)
}
// EnvelopeExpired triggered when envelope is expired but wasn't delivered to any peer.
func (h EnvelopeSignalHandler) EnvelopeExpired(hash common.Hash) {
2018-05-03 07:35:58 +00:00
signal.SendEnvelopeExpired(hash)
}