From 33da7fcbadacccc675e0b1205728b1e4088e5bfd Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Tue, 12 Nov 2024 08:52:36 +0100 Subject: [PATCH] use .confirm(1) in marketplace tests to ensure that the transaction has been processed before continuing with the test --- tests/contracts/testContracts.nim | 25 +++++++++++++------------ tests/contracts/testMarket.nim | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/contracts/testContracts.nim b/tests/contracts/testContracts.nim index bbbf41aa..8743ef85 100644 --- a/tests/contracts/testContracts.nim +++ b/tests/contracts/testContracts.nim @@ -45,13 +45,13 @@ ethersuite "Marketplace contracts": request.client = await client.getAddress() switchAccount(client) - discard await token.approve(marketplace.address, request.price) - discard await marketplace.requestStorage(request) + discard await token.approve(marketplace.address, request.price).confirm(1) + discard await marketplace.requestStorage(request).confirm(1) switchAccount(host) - discard await token.approve(marketplace.address, request.ask.collateral) - discard await marketplace.reserveSlot(request.id, 0.u256) + discard await token.approve(marketplace.address, request.ask.collateral).confirm(1) + discard await marketplace.reserveSlot(request.id, 0.u256).confirm(1) filledAt = await ethProvider.currentTime() - discard await marketplace.fillSlot(request.id, 0.u256, proof) + discard await marketplace.fillSlot(request.id, 0.u256, proof).confirm(1) slotId = request.slotId(0.u256) proc waitUntilProofRequired(slotId: SlotId) {.async.} = @@ -65,14 +65,14 @@ ethersuite "Marketplace contracts": proc startContract() {.async.} = for slotIndex in 1..