Skip to content

Commit

Permalink
Rename various mintToken functions to mintBurnAssets.
Browse files Browse the repository at this point in the history
This is consistent with the name of the endpoint.
  • Loading branch information
jonathanknowles committed Jun 29, 2021
1 parent 7c0636d commit 529a11b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/core/src/Cardano/Wallet/Api/Link.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module Cardano.Wallet.Api.Link
, getAsset
, listByronAssets
, getByronAsset
, mintToken
, mintBurnAssets

-- * Transactions
, createTransaction
Expand Down Expand Up @@ -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)
8 changes: 4 additions & 4 deletions lib/core/src/Cardano/Wallet/Api/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module Cardano.Wallet.Api.Server
, postSharedWallet
, patchSharedWallet
, mkSharedWallet
, mintToken
, mintBurnAssets

-- * Server error responses
, IsServerError(..)
Expand Down Expand Up @@ -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"
4 changes: 2 additions & 2 deletions lib/shelley/src/Cardano/Wallet/Shelley/Api/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ import Cardano.Wallet.Api.Server
, listTransactions
, listWallets
, migrateWallet
, mintToken
, mintBurnAssets
, mkLegacyWallet
, mkSharedWallet
, mkShelleyWallet
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 529a11b

Please sign in to comment.