From 529a11b87ef5f89bf69b77f696779ca5acea64d5 Mon Sep 17 00:00:00 2001 From: Jonathan Knowles Date: Tue, 29 Jun 2021 07:37:15 +0000 Subject: [PATCH] Rename various `mintToken` functions to `mintBurnAssets`. This is consistent with the name of the endpoint. --- lib/core/src/Cardano/Wallet/Api/Link.hs | 6 +++--- lib/core/src/Cardano/Wallet/Api/Server.hs | 8 ++++---- lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/core/src/Cardano/Wallet/Api/Link.hs b/lib/core/src/Cardano/Wallet/Api/Link.hs index a5dbf66d742..6f5c844dcfd 100644 --- a/lib/core/src/Cardano/Wallet/Api/Link.hs +++ b/lib/core/src/Cardano/Wallet/Api/Link.hs @@ -71,7 +71,7 @@ module Cardano.Wallet.Api.Link , getAsset , listByronAssets , getByronAsset - , mintToken + , mintBurnAssets -- * Transactions , createTransaction @@ -883,12 +883,12 @@ instance HasVerb sub => HasVerb (QueryFlag sym :> sub) where instance HasVerb sub => HasVerb (Header' opts name ty :> sub) where method _ = method (Proxy @sub) -mintToken +mintBurnAssets :: forall w. ( HasType (ApiT WalletId) w ) => w -> (Method, Text) -mintToken w = (endpoint @(Api.MintBurnAssets Net) (wid &)) +mintBurnAssets w = (endpoint @(Api.MintBurnAssets Net) (wid &)) where wid = w ^. typed @(ApiT WalletId) diff --git a/lib/core/src/Cardano/Wallet/Api/Server.hs b/lib/core/src/Cardano/Wallet/Api/Server.hs index cf2c5d617e9..60c6be2729d 100644 --- a/lib/core/src/Cardano/Wallet/Api/Server.hs +++ b/lib/core/src/Cardano/Wallet/Api/Server.hs @@ -87,7 +87,7 @@ module Cardano.Wallet.Api.Server , postSharedWallet , patchSharedWallet , mkSharedWallet - , mintToken + , mintBurnAssets -- * Server error responses , IsServerError(..) @@ -3662,11 +3662,11 @@ instance HasSeverityAnnotation WalletEngineLog where MsgWalletWorker msg -> getSeverityAnnotation msg MsgSubmitSealedTx msg -> getSeverityAnnotation msg -mintToken +mintBurnAssets :: forall ctx n . ctx -> ApiT WalletId -> Api.PostMintBurnAssetData n -> Handler (ApiMintBurnTransaction n) -mintToken _ctx (ApiT _wid) _body = - error "Minting is not supported - this is just a stub" +mintBurnAssets _ctx (ApiT _wid) _body = + error "Minting and burning are not supported - this is just a stub" diff --git a/lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs b/lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs index 13253d70bb0..d0425e933f1 100644 --- a/lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs +++ b/lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs @@ -86,7 +86,7 @@ import Cardano.Wallet.Api.Server , listTransactions , listWallets , migrateWallet - , mintToken + , mintBurnAssets , mkLegacyWallet , mkSharedWallet , mkShelleyWallet @@ -265,7 +265,7 @@ server byron icarus shelley multisig spl ntp = assets :: Server (Assets n) assets = - mintToken shelley + mintBurnAssets shelley :<|> listAssets shelley :<|> getAsset shelley :<|> getAssetDefault shelley