diff --git a/lib/core/src/Cardano/Wallet/Api.hs b/lib/core/src/Cardano/Wallet/Api.hs index cb3fb3e7b72..fa677ceb988 100644 --- a/lib/core/src/Cardano/Wallet/Api.hs +++ b/lib/core/src/Cardano/Wallet/Api.hs @@ -104,7 +104,6 @@ import Servant.API , NoContent , OctetStream , PostAccepted - , PostNoContent , Put , PutNoContent , QueryParam @@ -125,10 +124,9 @@ type CompatibilityApi t = :<|> GetByronWallet :<|> GetByronWalletMigrationInfo :<|> ListByronWallets - :<|> MigrateByronWallet + :<|> MigrateByronWallet t :<|> PostByronWallet - {------------------------------------------------------------------------------- Addresses @@ -293,13 +291,13 @@ type ListByronWallets = "byron" :> Get '[JSON] [ApiByronWallet] -- | https://input-output-hk.github.io/cardano-wallet/api/#operation/migrateByronWallet -type MigrateByronWallet = "byron" +type MigrateByronWallet t = "byron" :> "wallets" :> Capture "sourceWalletId" (ApiT WalletId) :> "migrate" :> Capture "targetWalletId" (ApiT WalletId) :> ReqBody '[JSON] ApiMigrateByronWalletData - :> PostNoContent '[Any] NoContent + :> PostAccepted '[JSON] [ApiTransaction t] -- | https://input-output-hk.github.io/cardano-wallet/api/#operation/postByronWallet type PostByronWallet = "byron" diff --git a/lib/core/src/Cardano/Wallet/Api/Server.hs b/lib/core/src/Cardano/Wallet/Api/Server.hs index 30a4ebfe9e5..a1a7b5ab770 100644 --- a/lib/core/src/Cardano/Wallet/Api/Server.hs +++ b/lib/core/src/Cardano/Wallet/Api/Server.hs @@ -764,7 +764,7 @@ migrateByronWallet -> ApiT WalletId -- ^ Target wallet (new-style) -> ApiMigrateByronWalletData - -> Handler NoContent + -> Handler [ApiTransaction t] migrateByronWallet _rndCtx _seqCtx _sourceWid _targetWid _migrateData = throwError err501 diff --git a/specifications/api/swagger.yaml b/specifications/api/swagger.yaml index 412000a6c6d..8a8157c5af4 100644 --- a/specifications/api/swagger.yaml +++ b/specifications/api/swagger.yaml @@ -821,8 +821,11 @@ x-responsesMigrateByronWallet: &responsesMigrateByronWallet <<: *responsesErr404 <<: *responsesErr405 <<: *responsesErr406 - 204: - description: No Content + 200: + description: Ok + schema: + type: array + items: *ApiTransaction x-responsesDeleteWallet: &responsesDeleteWallet <<: *responsesErr404