From 0d455fc3de1c4e3ff0d62b3e14abafb2d31fecb6 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Mon, 20 May 2024 08:48:31 +0000 Subject: [PATCH] Fix call to `dataTypeConstrs` in `FromJSON` instance for `SchemaApiErrorInfo`. --- lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs b/lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs index 1a88d62d2ef..3bd825c000b 100644 --- a/lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs +++ b/lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs @@ -1197,7 +1197,8 @@ data SchemaApiErrorInfo = SchemaApiErrorInfo instance FromJSON SchemaApiErrorInfo where parseJSON = withObject "SchemaApiErrorInfo" $ \o -> do let constructors :: [String] = - showConstr <$> dataTypeConstrs (dataTypeOf NoSuchWallet) + showConstr <$> + dataTypeConstrs (dataTypeOf (undefined :: ApiErrorInfo)) vals :: [Either String Yaml.Value] <- forM constructors $ \c -> maybe (Left c) Right <$> o .:? Aeson.fromString (toSchemaName c)