Skip to content

Commit

Permalink
Change name of field from enc to method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanknowles committed May 14, 2024
1 parent e20e592 commit c2b329f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lib/api/src/Cardano/Wallet/Api/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1245,7 +1245,7 @@ data ApiEncryptMetadataMethod = Basic

data ApiEncryptMetadata = ApiEncryptMetadata
{ passphrase :: ApiT (Passphrase "lenient")
, enc :: Maybe ApiEncryptMetadataMethod
, method :: Maybe ApiEncryptMetadataMethod
}
deriving (Eq, Generic, Show)
deriving (FromJSON, ToJSON) via DefaultRecord ApiEncryptMetadata
Expand Down
16 changes: 8 additions & 8 deletions lib/unit/test/data/Cardano/Wallet/Api/ApiEncryptMetadata.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions lib/unit/test/unit/Cardano/Wallet/Api/TypesSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ spec = do
it "short msg - no salt" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1243,7 +1243,7 @@ spec = do
it "long msg - no salt" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1291,7 +1291,7 @@ spec = do
it "cip msg - no salt" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1340,7 +1340,7 @@ spec = do
it "short msg - salted" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1385,7 +1385,7 @@ spec = do
it "long msg - salted" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1431,7 +1431,7 @@ spec = do
it "cip msg - salted" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down Expand Up @@ -1479,7 +1479,7 @@ spec = do
it "msg wrong label - no salt" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand All @@ -1505,7 +1505,7 @@ spec = do
it "msg without 'msg field' - no salt" $ do
let apiEncrypt = ApiEncryptMetadata
{ passphrase = ApiT $ Passphrase "cardano"
, enc = Nothing
, method = Nothing
}
schemaBefore =
TxMetadataWithSchema TxMetadataNoSchema $
Expand Down
2 changes: 1 addition & 1 deletion specifications/api/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1810,7 +1810,7 @@ x-encryptMetadata: &encryptMetadata
required:
- passphrase
properties:
enc: *encryptionMethod
method: *encryptionMethod
passphrase: *lenientPassphrase

x-transactionTTL: &transactionTTL
Expand Down

0 comments on commit c2b329f

Please sign in to comment.