Skip to content

Commit 1a5621c

Browse files
authored
fundAtAddressCondition await on utxos changes (IntersectMBO#3789)
1 parent 8b5093c commit 1a5621c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

plutus-contract/src/Plutus/Contract/Request.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,10 @@ fundsAtAddressCondition
344344
fundsAtAddressCondition condition addr = loopM go () where
345345
go () = do
346346
cur <- utxoAt addr
347-
sl <- currentSlot
348347
let presentVal = foldMap (txOutValue . txOutTxOut) cur
349348
if condition presentVal
350349
then pure (Right cur)
351-
else awaitSlot (sl + 1) >> pure (Left ())
350+
else awaitUtxoProduced addr >> pure (Left ())
352351

353352
-- | Watch an address for changes, and return the outputs
354353
-- at that address when the total value at the address

0 commit comments

Comments
 (0)