Skip to content

Commit e741f66

Browse files
committed
resolving review comments
1 parent dfc5d66 commit e741f66

File tree

3 files changed

+6
-13
lines changed

3 files changed

+6
-13
lines changed

src/BotPlutusInterface/Config.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ txStatusPollingSpec =
9494
sectionsSpec "TxStatusPolling configuration" $ do
9595
spInterval <-
9696
reqSection'
97-
"milliseconds"
97+
"microseconds"
9898
naturalSpec
9999
"Interval between chain-index queries for transactions status change detection"
100100
spBlocksTimeOut <-

src/BotPlutusInterface/Contract.hs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ import BotPlutusInterface.Types (
3333
LogLevel (Debug, Warn),
3434
Tip (block, slot),
3535
TxFile (Signed),
36-
-- spBlocksTimeOut,
37-
-- spInterval,
3836
)
3937
import Cardano.Api (AsType (..), EraInMode (..), Tx (Tx))
4038
import Control.Lens (preview, (^.))
@@ -233,15 +231,10 @@ awaitTxStatusChange contractEnv txId = do
233231
txStatus <- getStatus
234232
case (txStatus, currBlock > cutOffBlock) of
235233
(status, True) -> do
236-
logDebug . mconcat $
237-
[ "Timeout for waiting `TxId "
238-
, show txId
239-
, "` status cahnge reached"
240-
, " - waited "
241-
, show pollTimeout
242-
, " blocks."
243-
, " Current status: "
244-
, show status
234+
logDebug . mconcat . fmap mconcat $
235+
[ ["Timeout for waiting `TxId ", show txId, "` status change reached"]
236+
, [" - waited ", show pollTimeout, " blocks."]
237+
, [" Current status: ", show status]
245238
]
246239
return status
247240
(Unknown, _) -> do

test/Spec/BotPlutusInterface/TxStatusChange.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ testTxFoundAndConfirmed = do
6464

6565
case runContractPure contract initState of
6666
(Left err, _) -> assertFailure $ Text.unpack err
67-
(Right Unknown, _) -> assertFailure "State should not be Unknown"
67+
(Right Unknown, _) -> assertFailure "Tx status should not be Unknown but it is"
6868
(Right _, _) -> pure ()
6969

7070
testStopWaitingByTimeout :: Assertion

0 commit comments

Comments
 (0)