mirror of
https://github.com/status-im/status-go.git
synced 2025-02-21 11:18:28 +00:00
Run make vendor
This commit is contained in:
parent
18af9175ac
commit
41cba814c8
6
vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go
generated
vendored
6
vendor/github.com/status-im/status-go/eth-node/bridge/geth/whisper.go
generated
vendored
@ -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)
|
||||
}
|
||||
|
3
vendor/github.com/status-im/status-go/eth-node/types/whisper.go
generated
vendored
3
vendor/github.com/status-im/status-go/eth-node/types/whisper.go
generated
vendored
@ -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)
|
||||
|
||||
|
4
vendor/github.com/status-im/status-go/protocol/message_validator.go
generated
vendored
4
vendor/github.com/status-im/status-go/protocol/message_validator.go
generated
vendored
@ -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")
|
||||
}
|
||||
|
30
vendor/github.com/status-im/status-go/whisper/v6/whisper.go
generated
vendored
30
vendor/github.com/status-im/status-go/whisper/v6/whisper.go
generated
vendored
@ -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 ""
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user