Skip to content

Commit

Permalink
add submitTxWithWid to DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
paweljakubas committed Jan 17, 2022
1 parent ca8c7de commit 06e4067
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/core-integration/src/Test/Integration/Framework/DSL.hs
Expand Up @@ -113,6 +113,7 @@ module Test.Integration.Framework.DSL
, listAddresses
, signTx
, submitTx
, submitTxWithWid
, getWallet
, listTransactions
, listAllTransactions
Expand Down Expand Up @@ -2294,6 +2295,21 @@ submitTx ctx tx expectations = do
verify r expectations
pure $ getFromResponse Prelude.id r

submitTxWithWid
:: MonadUnliftIO m
=> Context
-> ApiWallet
-> ApiSerialisedTransaction
-> m (HTTP.Status, Either RequestException ApiTxId)
submitTxWithWid ctx w tx = do
let submitEndpoint = Link.submitTransaction @'Shelley w
let payload = Json $ Aeson.toJSON tx
let headers = Headers
[ ("Content-Type", "application/json")
, ("Accept", "application/json")
]
request @ApiTxId ctx submitEndpoint headers payload

getWallet
:: forall w m.
( MonadIO m
Expand Down

0 comments on commit 06e4067

Please sign in to comment.