mirror of
https://github.com/status-im/status-go.git
synced 2025-01-09 14:16:21 +00:00
a1b3e3a772
There was a bug on status-react where it would save filters that were not listened to. This commit adds a task to clean up those filters as they might result in long syncing times. This commit also returns topics/ranges/mailserves from messenger in order to make the initialization of the app simpler and start moving logic to status-go. It also removes whisper from vendor.
34 lines
1.2 KiB
Go
34 lines
1.2 KiB
Go
package gethbridge
|
|
|
|
import (
|
|
"github.com/status-im/status-go/eth-node/types"
|
|
"github.com/status-im/status-go/waku"
|
|
"github.com/status-im/status-go/whisper"
|
|
)
|
|
|
|
// NewWhisperMailServerResponseWrapper returns a types.MailServerResponse object that mimics Geth's MailServerResponse
|
|
func NewWhisperMailServerResponseWrapper(mailServerResponse *whisper.MailServerResponse) *types.MailServerResponse {
|
|
if mailServerResponse == nil {
|
|
panic("mailServerResponse should not be nil")
|
|
}
|
|
|
|
return &types.MailServerResponse{
|
|
LastEnvelopeHash: types.Hash(mailServerResponse.LastEnvelopeHash),
|
|
Cursor: mailServerResponse.Cursor,
|
|
Error: mailServerResponse.Error,
|
|
}
|
|
}
|
|
|
|
// NewWakuMailServerResponseWrapper returns a types.MailServerResponse object that mimics Geth's MailServerResponse
|
|
func NewWakuMailServerResponseWrapper(mailServerResponse *waku.MailServerResponse) *types.MailServerResponse {
|
|
if mailServerResponse == nil {
|
|
panic("mailServerResponse should not be nil")
|
|
}
|
|
|
|
return &types.MailServerResponse{
|
|
LastEnvelopeHash: types.Hash(mailServerResponse.LastEnvelopeHash),
|
|
Cursor: mailServerResponse.Cursor,
|
|
Error: mailServerResponse.Error,
|
|
}
|
|
}
|