Skip to content

Commit a8af3b4

Browse files
committed
Restore balance provider check
1 parent e26be56 commit a8af3b4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/integration/testmarketplace.nim

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,6 @@ marketplacesuite "Marketplace payouts":
284284

285285
# wait until one slot is filled
286286
check eventually(slotIdxFilled.isSome, timeout = expiry.int * 1000)
287-
288287
let slotId = slotId(!(await clientApi.requestId(id)), !slotIdxFilled)
289288

290289
# wait until sale is cancelled
@@ -298,12 +297,10 @@ marketplacesuite "Marketplace payouts":
298297
let pricePerSlotPerSecond = minPricePerBytePerSecond * slotSize
299298

300299
check eventually (
301-
let endBalanceClient = (await token.balanceOf(client.ethAccount))
302300
let endBalanceProvider = (await token.balanceOf(provider.ethAccount))
303-
(startBalanceClient - endBalanceClient) ==
304-
(endBalanceProvider - startBalanceProvider)
301+
endBalanceProvider > startBalanceProvider and
302+
endBalanceProvider < startBalanceProvider + expiry.u256 * pricePerSlotPerSecond
305303
)
306-
307304
check eventually(
308305
(
309306
let endBalanceClient = (await token.balanceOf(client.ethAccount))

0 commit comments

Comments
 (0)