Skip to content

Commit

Permalink
Remove usages of inject and Coin
Browse files Browse the repository at this point in the history
  • Loading branch information
palas committed Dec 10, 2024
1 parent b33ebe4 commit ec017ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cardano-api/src/Cardano/Api/Experimental.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ module Cardano.Api.Experimental
-- @
-- let txOut = Api.TxOut
-- destAddress
-- (Api.TxOutValueShelleyBased sbe (Api.inject (Ledger.Coin 10_000_000)))
-- (Api.lovelaceToTxOutValue sbe 10_000_000)
-- Api.TxOutDatumNone
-- Script.ReferenceScriptNone
-- @
--
-- We must also set the fee for the transaction. For example, let's set it to 2 ADA:
--
-- @
-- let txFee = Api.TxFeeExplicit sbe (Ledger.Coin 2_000_000)
-- let txFee = Api.TxFeeExplicit sbe 2_000_000
-- @
--
-- Finally, we can create the 'TxBodyContent' by using the 'defaultTxBodyContent' function and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ prop_created_transaction_with_both_apis_are_the_same = H.propertyOnce $ do
& Api.setTxOuts
[ Api.TxOut
destAddress
(Api.TxOutValueShelleyBased sbe (Api.inject (Ledger.Coin 10_000_000)))
(Api.lovelaceToTxOutValue sbe 10_000_000)
Api.TxOutDatumNone
Script.ReferenceScriptNone
]
& Api.setTxFee (Api.TxFeeExplicit sbe (Ledger.Coin 2_000_000))
& Api.setTxFee (Api.TxFeeExplicit sbe 2_000_000)

return txBodyContent

Expand Down

0 comments on commit ec017ee

Please sign in to comment.