status-im / status-console-client

Status messaging console user interface
Mozilla Public License 2.0
10 stars 2 forks source link

Extract public keys comparison to a helper #64

Open adambabik opened 5 years ago

adambabik commented 5 years ago

In a few places, we rely on the checking equality of public keys. We use elliptic curves which means we have three parameters to compare: type, X and Y coordinates.

Currently, in a few places this can be found:

if publicKey.X.Cmp(c.PublicKey.X) == 0 && publicKey.Y.Cmp(c.PublicKey.Y) == 0 {
// ...
}