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 authored and paweljakubas committed Jun 11, 2024
1 parent b367c36 commit 556012e
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 @@ -1243,7 +1243,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 @@ -1217,7 +1217,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 @@ -1261,7 +1261,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 @@ -1309,7 +1309,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 @@ -1358,7 +1358,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 @@ -1403,7 +1403,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 @@ -1449,7 +1449,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 @@ -1497,7 +1497,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 @@ -1523,7 +1523,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 556012e

Please sign in to comment.