diff --git a/lib/primitive/lib/Cardano/Wallet/Primitive/Types/MetadataEncryption.hs b/lib/primitive/lib/Cardano/Wallet/Primitive/Types/MetadataEncryption.hs index 6812430139e..b719d92b236 100644 --- a/lib/primitive/lib/Cardano/Wallet/Primitive/Types/MetadataEncryption.hs +++ b/lib/primitive/lib/Cardano/Wallet/Primitive/Types/MetadataEncryption.hs @@ -63,10 +63,10 @@ import Data.ByteString ( ByteString ) import Data.Maybe - ( fromMaybe + ( formJust + , fromMaybe , isJust , isNothing - , fromJust , mapMaybe ) import Data.Text diff --git a/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/MetadataEncryptionSpec.hs b/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/MetadataEncryptionSpec.hs index ab3ff045b9b..b7d56203bdd 100644 --- a/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/MetadataEncryptionSpec.hs +++ b/lib/primitive/test/spec/Cardano/Wallet/Primitive/Types/MetadataEncryptionSpec.hs @@ -479,16 +479,18 @@ instance Arbitrary TestingSetup where prop_roundtrip :: TestingSetup -> Property prop_roundtrip (TestingSetup payload' pwd' _ salt') = do - ((mapLeft (const ErrMissingValidEncryptionPayload) $ - toMetadataEncrypted pwd' payload' (Just salt')) >>= - fromMetadataEncrypted pwd') + (mapLeft + (const ErrMissingValidEncryptionPayload) + (toMetadataEncrypted pwd' payload' (Just salt')) + >>= fromMetadataEncrypted pwd') === Right payload' prop_passphrase :: TestingSetup -> Expectation prop_passphrase (TestingSetup payload' pwd1 pwd2 salt') = do - ((mapLeft (const ErrMissingValidEncryptionPayload) $ - toMetadataEncrypted pwd1 payload' (Just salt')) >>= - fromMetadataEncrypted pwd2) + (mapLeft + (const ErrMissingValidEncryptionPayload) + (toMetadataEncrypted pwd1 payload' (Just salt')) + >>= fromMetadataEncrypted pwd2) `shouldSatisfy` isLeft prop_structure_after_enc :: TestingSetup -> Expectation