From 41cba814c8088b4aaff9ebe906173a045fb221c7 Mon Sep 17 00:00:00 2001 From: Pedro Pombeiro Date: Mon, 30 Dec 2019 12:59:58 +0100 Subject: [PATCH] Run `make vendor` --- .../status-go/eth-node/bridge/geth/whisper.go | 6 ---- .../status-go/eth-node/types/whisper.go | 3 -- .../status-go/protocol/message_validator.go | 4 --- .../status-im/status-go/whisper/v6/whisper.go | 30 ------------------- 4 files changed, 43 deletions(-) diff --git a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go index 9fbfced31..53e9bf005 100644 --- a/vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go +++ b/vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go @@ -66,12 +66,6 @@ func (w *gethWhisperWrapper) SubscribeEnvelopeEvents(eventsProxy chan<- types.En return NewGethSubscriptionWrapper(w.whisper.SubscribeEnvelopeEvents(events)) } -// SelectedKeyPairID returns the id of currently selected key pair. -// It helps distinguish between different users w/o exposing the user identity itself. -func (w *gethWhisperWrapper) SelectedKeyPairID() string { - return w.whisper.SelectedKeyPairID() -} - func (w *gethWhisperWrapper) GetPrivateKey(id string) (*ecdsa.PrivateKey, error) { return w.whisper.GetPrivateKey(id) } diff --git a/vendor/github.com/status-im/status-go/eth-node/types/whisper.go b/vendor/github.com/status-im/status-go/eth-node/types/whisper.go index a8a34eab3..55bd0d119 100644 --- a/vendor/github.com/status-im/status-go/eth-node/types/whisper.go +++ b/vendor/github.com/status-im/status-go/eth-node/types/whisper.go @@ -38,9 +38,6 @@ type Whisper interface { // GetCurrentTime returns current time. GetCurrentTime() time.Time - // SelectedKeyPairID returns the id of currently selected key pair. - // It helps distinguish between different users w/o exposing the user identity itself. - SelectedKeyPairID() string // GetPrivateKey retrieves the private key of the specified identity. GetPrivateKey(id string) (*ecdsa.PrivateKey, error) diff --git a/vendor/github.com/status-im/status-go/protocol/message_validator.go b/vendor/github.com/status-im/status-go/protocol/message_validator.go index 7c1bd5623..845ef0810 100644 --- a/vendor/github.com/status-im/status-go/protocol/message_validator.go +++ b/vendor/github.com/status-im/status-go/protocol/message_validator.go @@ -39,10 +39,6 @@ func ValidateReceivedChatMessage(message *protobuf.ChatMessage) error { if sticker == nil { return errors.New("No sticker content") } - - if sticker.Pack == 0 { - return errors.New("Sticker pack not set") - } if len(sticker.Hash) == 0 { return errors.New("Sticker hash not set") } diff --git a/vendor/github.com/status-im/status-go/whisper/v6/whisper.go b/vendor/github.com/status-im/status-go/whisper/v6/whisper.go index ef1143acd..1f30ce3db 100644 --- a/vendor/github.com/status-im/status-go/whisper/v6/whisper.go +++ b/vendor/github.com/status-im/status-go/whisper/v6/whisper.go @@ -633,24 +633,6 @@ func (whisper *Whisper) AddKeyPair(key *ecdsa.PrivateKey) (string, error) { return id, nil } -// SelectKeyPair adds cryptographic identity, and makes sure -// that it is the only private key known to the node. -func (whisper *Whisper) SelectKeyPair(key *ecdsa.PrivateKey) error { - id, err := makeDeterministicID(common.ToHex(crypto.FromECDSAPub(&key.PublicKey)), keyIDSize) - if err != nil { - return err - } - - whisper.keyMu.Lock() - defer whisper.keyMu.Unlock() - - whisper.privateKeys = make(map[string]*ecdsa.PrivateKey) // reset key store - whisper.privateKeys[id] = key - - log.Info("Whisper identity selected", "id", id, "key", common.ToHex(crypto.FromECDSAPub(&key.PublicKey))) - return nil -} - // DeleteKeyPairs removes all cryptographic identities known to the node func (whisper *Whisper) DeleteKeyPairs() error { whisper.keyMu.Lock() @@ -1608,15 +1590,3 @@ func addBloom(a, b []byte) []byte { } return c } - -// SelectedKeyPairID returns the id of currently selected key pair. -// It helps distinguish between different users w/o exposing the user identity itself. -func (whisper *Whisper) SelectedKeyPairID() string { - whisper.keyMu.RLock() - defer whisper.keyMu.RUnlock() - - for id := range whisper.privateKeys { - return id - } - return "" -}