diff options
-rw-r--r-- | src/Crypto/Tox.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Crypto/Tox.hs b/src/Crypto/Tox.hs index bd4cdfba..d418f504 100644 --- a/src/Crypto/Tox.hs +++ b/src/Crypto/Tox.hs | |||
@@ -582,7 +582,8 @@ data TransportCrypto = TransportCrypto | |||
582 | } | 582 | } |
583 | 583 | ||
584 | getPublicKey :: S.Get PublicKey | 584 | getPublicKey :: S.Get PublicKey |
585 | getPublicKey = throwCryptoError . publicKey <$> S.getBytes 32 | 585 | getPublicKey = eitherCryptoError . publicKey <$> S.getBytes 32 |
586 | >>= either (fail . show) return | ||
586 | 587 | ||
587 | putPublicKey :: PublicKey -> S.Put | 588 | putPublicKey :: PublicKey -> S.Put |
588 | putPublicKey bs = S.putByteString $ BA.convert bs | 589 | putPublicKey bs = S.putByteString $ BA.convert bs |